blob: 9b52f930edf8f3f700794116d04a0604973dd9aa [file] [log] [blame]
Alan Cuttereb525cd02020-06-20 03:12:421// Copyright 2020 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_PROTO_UTILS_H_
6#define CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_PROTO_UTILS_H_
7
8#include <vector>
9
10#include "base/optional.h"
11#include "chrome/browser/web_applications/web_app.h"
12#include "components/sync/protocol/web_app_specifics.pb.h"
13
14namespace web_app {
15
16using RepeatedIconInfosProto =
17 const ::google::protobuf::RepeatedPtrField<::sync_pb::WebAppIconInfo>;
18
19base::Optional<std::vector<WebApplicationIconInfo>> ParseWebAppIconInfos(
20 const char* outer_container_name,
21 RepeatedIconInfosProto icon_infos_proto);
22
23base::Optional<WebApp::SyncData> ParseWebAppSyncData(
24 const sync_pb::WebAppSpecifics& sync_proto);
25
26} // namespace web_app
27
28#endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_PROTO_UTILS_H_