Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: components/gcm_driver/gcm_driver.h

Issue 594383003: [GCM] Passing GCMClient::AccountTokenInfo list to GCMDriver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@account-mapper
Patch Set: Addressing CR comments Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_
6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // Get GCM client internal states and statistics. 111 // Get GCM client internal states and statistics.
112 // If clear_logs is true then activity logs will be cleared before the stats 112 // If clear_logs is true then activity logs will be cleared before the stats
113 // are returned. 113 // are returned.
114 virtual void GetGCMStatistics(const GetGCMStatisticsCallback& callback, 114 virtual void GetGCMStatistics(const GetGCMStatisticsCallback& callback,
115 bool clear_logs) = 0; 115 bool clear_logs) = 0;
116 116
117 // Enables/disables GCM activity recording, and then returns the stats. 117 // Enables/disables GCM activity recording, and then returns the stats.
118 virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback, 118 virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback,
119 bool recording) = 0; 119 bool recording) = 0;
120 120
121 // sets a list of signed in accounts with OAuth2 access tokens, when GCMDriver
122 // works in context of a signed in entity (e.g. browser profile where user is
123 // signed into sync).
124 // |account_tokens|: list of email addresses, account IDs and OAuth2 access
125 // tokens.
126 virtual void SetAccountTokens(
127 const std::vector<GCMClient::AccountTokenInfo>& account_tokens) = 0;
128
121 // Updates the |account_mapping| information in persistent store. 129 // Updates the |account_mapping| information in persistent store.
122 virtual void UpdateAccountMapping(const AccountMapping& account_mapping) = 0; 130 virtual void UpdateAccountMapping(const AccountMapping& account_mapping) = 0;
123 131
124 // Removes the account mapping information reated to |account_id| from 132 // Removes the account mapping information reated to |account_id| from
125 // persistent store. 133 // persistent store.
126 virtual void RemoveAccountMapping(const std::string& account_id) = 0; 134 virtual void RemoveAccountMapping(const std::string& account_id) = 0;
127 135
128 protected: 136 protected:
129 // Ensures that the GCM service starts (if necessary conditions are met). 137 // Ensures that the GCM service starts (if necessary conditions are met).
130 virtual GCMClient::Result EnsureStarted() = 0; 138 virtual GCMClient::Result EnsureStarted() = 0;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 187
180 // The default handler when no app handler can be found in the map. 188 // The default handler when no app handler can be found in the map.
181 DefaultGCMAppHandler default_app_handler_; 189 DefaultGCMAppHandler default_app_handler_;
182 190
183 DISALLOW_COPY_AND_ASSIGN(GCMDriver); 191 DISALLOW_COPY_AND_ASSIGN(GCMDriver);
184 }; 192 };
185 193
186 } // namespace gcm 194 } // namespace gcm
187 195
188 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ 196 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_client_impl_unittest.cc ('k') | components/gcm_driver/gcm_driver_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698