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 CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_IDENTITY_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_IDENTITY_PROVIDER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_IDENTITY_PROVIDER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_IDENTITY_PROVIDER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "google_apis/gaia/identity_provider.h" | 9 #include "google_apis/gaia/identity_provider.h" |
10 | 10 |
11 namespace chromeos { | 11 namespace chromeos { |
12 | 12 |
13 class DeviceOAuth2TokenService; | 13 class DeviceOAuth2TokenService; |
14 | 14 |
15 // Identity provider implementation backed by DeviceOAuth2TokenService. | 15 // Identity provider implementation backed by DeviceOAuth2TokenService. |
16 class DeviceIdentityProvider : public IdentityProvider { | 16 class DeviceIdentityProvider : public IdentityProvider { |
17 public: | 17 public: |
18 explicit DeviceIdentityProvider( | 18 explicit DeviceIdentityProvider( |
19 chromeos::DeviceOAuth2TokenService* token_service); | 19 chromeos::DeviceOAuth2TokenService* token_service); |
20 virtual ~DeviceIdentityProvider(); | 20 ~DeviceIdentityProvider() override; |
21 | 21 |
22 // IdentityProvider: | 22 // IdentityProvider: |
23 virtual std::string GetActiveUsername() override; | 23 std::string GetActiveUsername() override; |
24 virtual std::string GetActiveAccountId() override; | 24 std::string GetActiveAccountId() override; |
25 virtual OAuth2TokenService* GetTokenService() override; | 25 OAuth2TokenService* GetTokenService() override; |
26 virtual bool RequestLogin() override; | 26 bool RequestLogin() override; |
27 | 27 |
28 private: | 28 private: |
29 chromeos::DeviceOAuth2TokenService* token_service_; | 29 chromeos::DeviceOAuth2TokenService* token_service_; |
30 | 30 |
31 DISALLOW_COPY_AND_ASSIGN(DeviceIdentityProvider); | 31 DISALLOW_COPY_AND_ASSIGN(DeviceIdentityProvider); |
32 }; | 32 }; |
33 | 33 |
34 } // namespace chromeos | 34 } // namespace chromeos |
35 | 35 |
36 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_IDENTITY_PROVIDER_H_ | 36 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_IDENTITY_PROVIDER_H_ |
OLD | NEW |