| OLD | NEW | 
|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_SIGNIN_CORE_BROWSER_ACCOUNT_FETCHER_SERVICE_H_ | 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_FETCHER_SERVICE_H_ | 
| 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_FETCHER_SERVICE_H_ | 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_FETCHER_SERVICE_H_ | 
| 7 | 7 | 
|  | 8 #include <stdint.h> | 
|  | 9 | 
| 8 #include "base/containers/scoped_ptr_hash_map.h" | 10 #include "base/containers/scoped_ptr_hash_map.h" | 
|  | 11 #include "base/macros.h" | 
| 9 #include "base/threading/non_thread_safe.h" | 12 #include "base/threading/non_thread_safe.h" | 
| 10 #include "base/timer/timer.h" | 13 #include "base/timer/timer.h" | 
| 11 #include "components/keyed_service/core/keyed_service.h" | 14 #include "components/keyed_service/core/keyed_service.h" | 
| 12 #include "google_apis/gaia/oauth2_token_service.h" | 15 #include "google_apis/gaia/oauth2_token_service.h" | 
| 13 | 16 | 
| 14 class AccountInfoFetcher; | 17 class AccountInfoFetcher; | 
| 15 class AccountTrackerService; | 18 class AccountTrackerService; | 
| 16 class ChildAccountInfoFetcher; | 19 class ChildAccountInfoFetcher; | 
| 17 class OAuth2TokenService; | 20 class OAuth2TokenService; | 
| 18 class RefreshTokenAnnotationRequest; | 21 class RefreshTokenAnnotationRequest; | 
| 19 class SigninClient; | 22 class SigninClient; | 
| 20 | 23 | 
| 21 namespace invalidation { | 24 namespace invalidation { | 
| 22 class InvalidationService; | 25 class InvalidationService; | 
| 23 } | 26 } | 
| 24 | 27 | 
| 25 namespace user_prefs { | 28 namespace user_prefs { | 
| 26 class PrefRegistrySyncable; | 29 class PrefRegistrySyncable; | 
| 27 } | 30 } | 
| 28 | 31 | 
| 29 class AccountFetcherService : public KeyedService, | 32 class AccountFetcherService : public KeyedService, | 
| 30                               public OAuth2TokenService::Observer, | 33                               public OAuth2TokenService::Observer, | 
| 31                               public base::NonThreadSafe { | 34                               public base::NonThreadSafe { | 
| 32  public: | 35  public: | 
| 33   // Name of the preference that tracks the int64 representation of the last | 36   // Name of the preference that tracks the int64_t representation of the last | 
| 34   // time the AccountTrackerService was updated. | 37   // time the AccountTrackerService was updated. | 
| 35   static const char kLastUpdatePref[]; | 38   static const char kLastUpdatePref[]; | 
| 36 | 39 | 
| 37   AccountFetcherService(); | 40   AccountFetcherService(); | 
| 38   ~AccountFetcherService() override; | 41   ~AccountFetcherService() override; | 
| 39 | 42 | 
| 40   // Registers the preferences used by AccountFetcherService. | 43   // Registers the preferences used by AccountFetcherService. | 
| 41   static void RegisterPrefs(user_prefs::PrefRegistrySyncable* user_prefs); | 44   static void RegisterPrefs(user_prefs::PrefRegistrySyncable* user_prefs); | 
| 42 | 45 | 
| 43   void Initialize(SigninClient* signin_client, | 46   void Initialize(SigninClient* signin_client, | 
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 130   base::ScopedPtrHashMap<std::string, scoped_ptr<AccountInfoFetcher>> | 133   base::ScopedPtrHashMap<std::string, scoped_ptr<AccountInfoFetcher>> | 
| 131       user_info_requests_; | 134       user_info_requests_; | 
| 132   // Holds references to refresh token annotation requests keyed by account_id. | 135   // Holds references to refresh token annotation requests keyed by account_id. | 
| 133   base::ScopedPtrHashMap<std::string, scoped_ptr<RefreshTokenAnnotationRequest>> | 136   base::ScopedPtrHashMap<std::string, scoped_ptr<RefreshTokenAnnotationRequest>> | 
| 134       refresh_token_annotation_requests_; | 137       refresh_token_annotation_requests_; | 
| 135 | 138 | 
| 136   DISALLOW_COPY_AND_ASSIGN(AccountFetcherService); | 139   DISALLOW_COPY_AND_ASSIGN(AccountFetcherService); | 
| 137 }; | 140 }; | 
| 138 | 141 | 
| 139 #endif  // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_FETCHER_SERVICE_H_ | 142 #endif  // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_FETCHER_SERVICE_H_ | 
| OLD | NEW | 
|---|