app_list: Re-enable people search.
[chromium-blink-merge.git] / chrome / browser / extensions / api / copresence / copresence_translations.h
bloba0f9fd9f4f7dc13a667cc53c073ac7328b21a0d0
1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_TRANSLATIONS_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_TRANSLATIONS_H_
8 #include <map>
9 #include <string>
10 #include <vector>
12 #include "base/macros.h"
13 #include "base/memory/linked_ptr.h"
14 #include "components/copresence/proto/enums.pb.h"
16 namespace copresence {
17 class ReportRequest;
20 namespace extensions {
22 namespace api {
23 namespace copresence {
24 struct Operation;
25 struct PublishOperation;
26 struct SubscribeOperation;
30 // A 1-1 map of of which app a subscription id belongs to.
31 // Key = subscription, value = app_id.
32 typedef std::map<std::string, std::string> SubscriptionToAppMap;
34 // Returns report request protocol buffer containing all the operations in the
35 // given vector. If parsing any of the operations fails, we return false.
36 bool PrepareReportRequestProto(
37 const std::vector<linked_ptr<api::copresence::Operation>>& operations,
38 const std::string& app_id,
39 SubscriptionToAppMap* apps_by_subscription_id,
40 copresence::ReportRequest* request);
42 } // namespace extensions
44 #endif // CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_TRANSLATIONS_H_