blob: 990f53d6b7708e80d7eadbaee984c926df43d170 [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(
Alan Cutter1e6a3ac42020-06-24 05:04:1320 const char* container_name_for_logging,
Alan Cuttereb525cd02020-06-20 03:12:4221 RepeatedIconInfosProto icon_infos_proto);
22
Alan Cutter1e6a3ac42020-06-24 05:04:1323base::Optional<WebApp::SyncData> ParseWebAppSyncDataStruct(
Alan Cuttereb525cd02020-06-20 03:12:4224 const sync_pb::WebAppSpecifics& sync_proto);
25
26} // namespace web_app
27
28#endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_PROTO_UTILS_H_