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

Side by Side Diff: components/signin/core/browser/account_fetcher_service.h

Issue 2908263003: Replace deprecated base::NonThreadSafe in components/signin in favor of SequenceChecker. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | components/signin/core/browser/account_fetcher_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <unordered_map> 11 #include <unordered_map>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/threading/non_thread_safe.h" 14 #include "base/sequence_checker.h"
15 #include "base/timer/timer.h" 15 #include "base/timer/timer.h"
16 #include "components/keyed_service/core/keyed_service.h" 16 #include "components/keyed_service/core/keyed_service.h"
17 #include "google_apis/gaia/oauth2_token_service.h" 17 #include "google_apis/gaia/oauth2_token_service.h"
18 18
19 class AccountInfoFetcher; 19 class AccountInfoFetcher;
20 class AccountTrackerService; 20 class AccountTrackerService;
21 class ChildAccountInfoFetcher; 21 class ChildAccountInfoFetcher;
22 class OAuth2TokenService; 22 class OAuth2TokenService;
23 class RefreshTokenAnnotationRequest; 23 class RefreshTokenAnnotationRequest;
24 class SigninClient; 24 class SigninClient;
25 25
26 namespace invalidation { 26 namespace invalidation {
27 class InvalidationService; 27 class InvalidationService;
28 } 28 }
29 29
30 namespace user_prefs { 30 namespace user_prefs {
31 class PrefRegistrySyncable; 31 class PrefRegistrySyncable;
32 } 32 }
33 33
34 class AccountFetcherService : public KeyedService, 34 class AccountFetcherService : public KeyedService,
35 public OAuth2TokenService::Observer, 35 public OAuth2TokenService::Observer {
36 public base::NonThreadSafe {
37 public: 36 public:
38 // Name of the preference that tracks the int64_t representation of the last 37 // Name of the preference that tracks the int64_t representation of the last
39 // time the AccountTrackerService was updated. 38 // time the AccountTrackerService was updated.
40 static const char kLastUpdatePref[]; 39 static const char kLastUpdatePref[];
41 40
42 AccountFetcherService(); 41 AccountFetcherService();
43 ~AccountFetcherService() override; 42 ~AccountFetcherService() override;
44 43
45 // Registers the preferences used by AccountFetcherService. 44 // Registers the preferences used by AccountFetcherService.
46 static void RegisterPrefs(user_prefs::PrefRegistrySyncable* user_prefs); 45 static void RegisterPrefs(user_prefs::PrefRegistrySyncable* user_prefs);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 std::unique_ptr<ChildAccountInfoFetcher> child_info_request_; 131 std::unique_ptr<ChildAccountInfoFetcher> child_info_request_;
133 132
134 // Holds references to account info fetchers keyed by account_id. 133 // Holds references to account info fetchers keyed by account_id.
135 std::unordered_map<std::string, std::unique_ptr<AccountInfoFetcher>> 134 std::unordered_map<std::string, std::unique_ptr<AccountInfoFetcher>>
136 user_info_requests_; 135 user_info_requests_;
137 // Holds references to refresh token annotation requests keyed by account_id. 136 // Holds references to refresh token annotation requests keyed by account_id.
138 std::unordered_map<std::string, 137 std::unordered_map<std::string,
139 std::unique_ptr<RefreshTokenAnnotationRequest>> 138 std::unique_ptr<RefreshTokenAnnotationRequest>>
140 refresh_token_annotation_requests_; 139 refresh_token_annotation_requests_;
141 140
141 SEQUENCE_CHECKER(sequence_checker_);
142
142 DISALLOW_COPY_AND_ASSIGN(AccountFetcherService); 143 DISALLOW_COPY_AND_ASSIGN(AccountFetcherService);
143 }; 144 };
144 145
145 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_FETCHER_SERVICE_H_ 146 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_FETCHER_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | components/signin/core/browser/account_fetcher_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698