Chromium Code Reviews| Index: chrome/browser/services/gcm/gcm_profile_service.cc |
| diff --git a/chrome/browser/services/gcm/gcm_profile_service.cc b/chrome/browser/services/gcm/gcm_profile_service.cc |
| index 0de6385d77b6fe0d6f1fa820c404316e224569b5..12641318346f4d398cbff63c806d9add80b64921 100644 |
| --- a/chrome/browser/services/gcm/gcm_profile_service.cc |
| +++ b/chrome/browser/services/gcm/gcm_profile_service.cc |
| @@ -43,7 +43,7 @@ namespace gcm { |
| // in. It ensures that account tracker is taking |
| class GCMProfileService::IdentityObserver : public IdentityProvider::Observer { |
| public: |
| - IdentityObserver(Profile* profile, GCMDriverDesktop* driver); |
| + IdentityObserver(Profile* profile, GCMDriver* driver); |
| virtual ~IdentityObserver(); |
| // IdentityProvider::Observer: |
| @@ -55,11 +55,11 @@ class GCMProfileService::IdentityObserver : public IdentityProvider::Observer { |
| // Called to inform IdentityObserver that a list of accounts was updated. |
| // |account_tokens| maps email addresses to OAuth2 access tokens. |
|
jianli
2014/09/25 20:26:45
Please update the comment here.
fgorski
2014/09/26 22:51:42
Done.
|
| void AccountsUpdated( |
| - const std::map<std::string, std::string>& account_tokens); |
| + const std::vector<GCMClient::AccountTokenInfo>& account_tokens); |
| private: |
| Profile* profile_; |
| - GCMDriverDesktop* driver_; |
| + GCMDriver* driver_; |
| scoped_ptr<IdentityProvider> identity_provider_; |
| scoped_ptr<GCMAccountTracker> gcm_account_tracker_; |
| @@ -73,7 +73,7 @@ class GCMProfileService::IdentityObserver : public IdentityProvider::Observer { |
| }; |
| GCMProfileService::IdentityObserver::IdentityObserver(Profile* profile, |
| - GCMDriverDesktop* driver) |
| + GCMDriver* driver) |
| : profile_(profile), driver_(driver), weak_ptr_factory_(this) { |
| identity_provider_.reset(new ProfileIdentityProvider( |
| SigninManagerFactory::GetForProfile(profile), |
| @@ -131,8 +131,8 @@ std::string GCMProfileService::IdentityObserver::SignedInUserName() const { |
| } |
| void GCMProfileService::IdentityObserver::AccountsUpdated( |
| - const std::map<std::string, std::string>& account_tokens) { |
| - driver_->SetAccountsForCheckin(account_tokens); |
| + const std::vector<GCMClient::AccountTokenInfo>& account_tokens) { |
| + driver_->SetAccountTokens(account_tokens); |
| } |
| #endif // !defined(OS_ANDROID) |
| @@ -178,8 +178,7 @@ GCMProfileService::GCMProfileService( |
| driver_->AddConnectionObserver(chromeos_connection_observer_.get()); |
| #endif |
| - identity_observer_.reset(new IdentityObserver( |
| - profile, static_cast<gcm::GCMDriverDesktop*>(driver_.get()))); |
| + identity_observer_.reset(new IdentityObserver(profile, driver_.get())); |
| } |
| #endif // defined(OS_ANDROID) |