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

Side by Side Diff: components/signin/ios/browser/profile_oauth2_token_service_ios.h

Issue 1143323005: Refactor AO2TS to make it easier to componentize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address roger's comments Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_IOS_BROWSER_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_H_ 5 #ifndef COMPONENTS_SIGNIN_IOS_BROWSER_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_H_
6 #define COMPONENTS_SIGNIN_IOS_BROWSER_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_H_ 6 #define COMPONENTS_SIGNIN_IOS_BROWSER_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/threading/thread_checker.h" 10 #include "base/threading/thread_checker.h"
(...skipping 15 matching lines...) Expand all
26 // Note: Requests should be started from the UI thread. To start a 26 // Note: Requests should be started from the UI thread. To start a
27 // request from aother thread, please use OAuth2TokenServiceRequest. 27 // request from aother thread, please use OAuth2TokenServiceRequest.
28 class ProfileOAuth2TokenServiceIOS : public ProfileOAuth2TokenService { 28 class ProfileOAuth2TokenServiceIOS : public ProfileOAuth2TokenService {
29 public: 29 public:
30 // KeyedService 30 // KeyedService
31 void Shutdown() override; 31 void Shutdown() override;
32 32
33 // OAuth2TokenService 33 // OAuth2TokenService
34 bool RefreshTokenIsAvailable(const std::string& account_id) const override; 34 bool RefreshTokenIsAvailable(const std::string& account_id) const override;
35 35
36 void InvalidateOAuth2Token(const std::string& account_id, 36 void InvalidateAccessToken(const std::string& account_id,
37 const std::string& client_id, 37 const std::string& client_id,
38 const ScopeSet& scopes, 38 const ScopeSet& scopes,
39 const std::string& access_token) override; 39 const std::string& access_token) override;
40 40
41 // ProfileOAuth2TokenService 41 // ProfileOAuth2TokenService
42 void Initialize(SigninClient* client, 42 void Initialize(SigninClient* client,
43 SigninErrorController* signin_error_controller) override; 43 SigninErrorController* signin_error_controller) override;
44 void LoadCredentials(const std::string& primary_account_id) override; 44 void LoadCredentials(const std::string& primary_account_id) override;
45 std::vector<std::string> GetAccounts() override; 45 std::vector<std::string> GetAccounts() override;
46 void UpdateAuthError(const std::string& account_id, 46 void UpdateAuthError(const std::string& account_id,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 // Calls to this class are expected to be made from the browser UI thread. 155 // Calls to this class are expected to be made from the browser UI thread.
156 // The purpose of this checker is to detect access to 156 // The purpose of this checker is to detect access to
157 // ProfileOAuth2TokenService from multiple threads in upstream code. 157 // ProfileOAuth2TokenService from multiple threads in upstream code.
158 base::ThreadChecker thread_checker_; 158 base::ThreadChecker thread_checker_;
159 159
160 DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenServiceIOS); 160 DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenServiceIOS);
161 }; 161 };
162 162
163 #endif // COMPONENTS_SIGNIN_IOS_BROWSER_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_H_ 163 #endif // COMPONENTS_SIGNIN_IOS_BROWSER_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698