| 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 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // a value of |GetRobotAccountId|. | 54 // a value of |GetRobotAccountId|. |
| 55 virtual std::string GetRefreshToken(const std::string& account_id) OVERRIDE; | 55 virtual std::string GetRefreshToken(const std::string& account_id) OVERRIDE; |
| 56 | 56 |
| 57 // Pull the robot account ID from device policy. | 57 // Pull the robot account ID from device policy. |
| 58 virtual std::string GetRobotAccountId(); | 58 virtual std::string GetRobotAccountId(); |
| 59 | 59 |
| 60 protected: | 60 protected: |
| 61 // Implementation of OAuth2TokenService. | 61 // Implementation of OAuth2TokenService. |
| 62 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | 62 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; |
| 63 virtual scoped_ptr<OAuth2TokenService::RequestImpl> CreateRequest( | 63 virtual scoped_ptr<OAuth2TokenService::RequestImpl> CreateRequest( |
| 64 const std::string& account_id, |
| 64 OAuth2TokenService::Consumer* consumer) OVERRIDE; | 65 OAuth2TokenService::Consumer* consumer) OVERRIDE; |
| 65 | 66 |
| 66 private: | 67 private: |
| 67 class ValidatingConsumer; | 68 class ValidatingConsumer; |
| 68 friend class ValidatingConsumer; | 69 friend class ValidatingConsumer; |
| 69 friend class DeviceOAuth2TokenServiceFactory; | 70 friend class DeviceOAuth2TokenServiceFactory; |
| 70 friend class DeviceOAuth2TokenServiceTest; | 71 friend class DeviceOAuth2TokenServiceTest; |
| 71 friend class TestDeviceOAuth2TokenService; | 72 friend class TestDeviceOAuth2TokenService; |
| 72 | 73 |
| 73 // Use DeviceOAuth2TokenServiceFactory to get an instance of this class. | 74 // Use DeviceOAuth2TokenServiceFactory to get an instance of this class. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 92 scoped_ptr<TokenEncryptor> token_encryptor_; | 93 scoped_ptr<TokenEncryptor> token_encryptor_; |
| 93 | 94 |
| 94 base::WeakPtrFactory<DeviceOAuth2TokenService> weak_ptr_factory_; | 95 base::WeakPtrFactory<DeviceOAuth2TokenService> weak_ptr_factory_; |
| 95 | 96 |
| 96 DISALLOW_COPY_AND_ASSIGN(DeviceOAuth2TokenService); | 97 DISALLOW_COPY_AND_ASSIGN(DeviceOAuth2TokenService); |
| 97 }; | 98 }; |
| 98 | 99 |
| 99 } // namespace chromeos | 100 } // namespace chromeos |
| 100 | 101 |
| 101 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_H_ | 102 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_H_ |
| OLD | NEW |