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

Unified Diff: components/gcm_driver/gcm_driver_desktop.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, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/gcm_driver/gcm_driver_android.cc ('k') | components/gcm_driver/gcm_driver_desktop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_driver_desktop.h
diff --git a/components/gcm_driver/gcm_driver_desktop.h b/components/gcm_driver/gcm_driver_desktop.h
index c1900ede8d455faf3b57bfb2a8234e2d176828b3..a73d38ca30d3e05b0aa6f09c9b6c509a325f7c52 100644
--- a/components/gcm_driver/gcm_driver_desktop.h
+++ b/components/gcm_driver/gcm_driver_desktop.h
@@ -37,6 +37,7 @@ class URLRequestContextGetter;
namespace gcm {
+class GCMAccountMapper;
class GCMAppHandler;
class GCMClientFactory;
class GCMDelayedTaskController;
@@ -75,19 +76,12 @@ class GCMDriverDesktop : public GCMDriver {
bool clear_logs) OVERRIDE;
virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback,
bool recording) OVERRIDE;
+ virtual void SetAccountTokens(
+ const std::vector<GCMClient::AccountTokenInfo>& account_tokens) OVERRIDE;
virtual void UpdateAccountMapping(
const AccountMapping& account_mapping) OVERRIDE;
virtual void RemoveAccountMapping(const std::string& account_id) OVERRIDE;
- // GCMDriverDesktop specific implementation.
- // Sets a list of accounts with OAuth2 tokens for the next checkin.
- // |account_tokens| maps email addresses to OAuth2 access tokens.
- // |account_removed| indicates that an account has been removed since the
- // last time the callback was called, which triggers an immediate checkin,
- // to ensure that association between device and account is removed.
- void SetAccountsForCheckin(
- const std::map<std::string, std::string>& account_tokens);
-
// Exposed for testing purpose.
bool gcm_enabled() const { return gcm_enabled_; }
GCMChannelStatusSyncer* gcm_channel_status_syncer_for_testing() {
@@ -158,6 +152,9 @@ class GCMDriverDesktop : public GCMDriver {
// Makes sure list is empty on destruction.
ObserverList<GCMConnectionObserver, true> connection_observer_list_;
+ // Account mapper. Only works when user is signed in.
+ scoped_ptr<GCMAccountMapper> account_mapper_;
+
scoped_refptr<base::SequencedTaskRunner> ui_thread_;
scoped_refptr<base::SequencedTaskRunner> io_thread_;
« no previous file with comments | « components/gcm_driver/gcm_driver_android.cc ('k') | components/gcm_driver/gcm_driver_desktop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698