| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/browser/extensions/api/identity/account_tracker.h" | 5 #include "chrome/browser/extensions/api/identity/account_tracker.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| 11 #include "chrome/browser/extensions/extension_system.h" | |
| 12 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/signin/profile_oauth2_token_service.h" | 12 #include "chrome/browser/signin/profile_oauth2_token_service.h" |
| 14 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 13 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 15 #include "chrome/browser/signin/signin_manager_base.h" | 14 #include "chrome/browser/signin/signin_manager_base.h" |
| 16 #include "content/public/browser/notification_details.h" | 15 #include "content/public/browser/notification_details.h" |
| 16 #include "extensions/browser/extension_system.h" |
| 17 | 17 |
| 18 namespace extensions { | 18 namespace extensions { |
| 19 | 19 |
| 20 AccountTracker::AccountTracker(Profile* profile) : profile_(profile) { | 20 AccountTracker::AccountTracker(Profile* profile) : profile_(profile) { |
| 21 registrar_.Add(this, | 21 registrar_.Add(this, |
| 22 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, | 22 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, |
| 23 content::Source<Profile>(profile_)); | 23 content::Source<Profile>(profile_)); |
| 24 | 24 |
| 25 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)->AddObserver(this); | 25 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)->AddObserver(this); |
| 26 SigninGlobalError::GetForProfile(profile_)->AddProvider(this); | 26 SigninGlobalError::GetForProfile(profile_)->AddProvider(this); |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 LOG(ERROR) << "OnOAuthError"; | 247 LOG(ERROR) << "OnOAuthError"; |
| 248 tracker_->OnUserInfoFetchFailure(this); | 248 tracker_->OnUserInfoFetchFailure(this); |
| 249 } | 249 } |
| 250 | 250 |
| 251 void AccountIdFetcher::OnNetworkError(int response_code) { | 251 void AccountIdFetcher::OnNetworkError(int response_code) { |
| 252 LOG(ERROR) << "OnNetworkError " << response_code; | 252 LOG(ERROR) << "OnNetworkError " << response_code; |
| 253 tracker_->OnUserInfoFetchFailure(this); | 253 tracker_->OnUserInfoFetchFailure(this); |
| 254 } | 254 } |
| 255 | 255 |
| 256 } // namespace extensions | 256 } // namespace extensions |
| OLD | NEW |