| OLD | NEW |
| 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_CORE_BROWSER_PROFILE_OAUTH2_TOKEN_SERVICE_H_ | 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_PROFILE_OAUTH2_TOKEN_SERVICE_H_ |
| 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_PROFILE_OAUTH2_TOKEN_SERVICE_H_ | 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_PROFILE_OAUTH2_TOKEN_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 // Simply returns NULL and should be overriden by subsclasses. | 87 // Simply returns NULL and should be overriden by subsclasses. |
| 88 virtual net::URLRequestContextGetter* GetRequestContext() override; | 88 virtual net::URLRequestContextGetter* GetRequestContext() override; |
| 89 | 89 |
| 90 // Updates the internal cache of the result from the most-recently-completed | 90 // Updates the internal cache of the result from the most-recently-completed |
| 91 // auth request (used for reporting errors to the user). | 91 // auth request (used for reporting errors to the user). |
| 92 virtual void UpdateAuthError( | 92 virtual void UpdateAuthError( |
| 93 const std::string& account_id, | 93 const std::string& account_id, |
| 94 const GoogleServiceAuthError& error) override; | 94 const GoogleServiceAuthError& error) override; |
| 95 | 95 |
| 96 // Validate that the account_id argument is valid. This method DCHECKs |
| 97 // when invalid. |
| 98 void ValidateAccountId(const std::string& account_id) const; |
| 99 |
| 96 private: | 100 private: |
| 97 // The client with which this instance was initialized, or NULL. | 101 // The client with which this instance was initialized, or NULL. |
| 98 SigninClient* client_; | 102 SigninClient* client_; |
| 99 | 103 |
| 100 // Used to expose auth errors to the UI. | 104 // Used to expose auth errors to the UI. |
| 101 scoped_ptr<SigninErrorController> signin_error_controller_; | 105 scoped_ptr<SigninErrorController> signin_error_controller_; |
| 102 | 106 |
| 103 DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenService); | 107 DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenService); |
| 104 }; | 108 }; |
| 105 | 109 |
| 106 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_PROFILE_OAUTH2_TOKEN_SERVICE_H_ | 110 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_PROFILE_OAUTH2_TOKEN_SERVICE_H_ |
| OLD | NEW |