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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_IDENTITY_PROVIDER_H_
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_IDENTITY_PROVIDER_H_
8 #include "base/macros.h"
9 #include "google_apis/gaia/identity_provider.h"
13 class DeviceOAuth2TokenService
;
15 // Identity provider implementation backed by DeviceOAuth2TokenService.
16 class DeviceIdentityProvider
: public IdentityProvider
{
18 explicit DeviceIdentityProvider(
19 chromeos::DeviceOAuth2TokenService
* token_service
);
20 ~DeviceIdentityProvider() override
;
23 std::string
GetActiveUsername() override
;
24 std::string
GetActiveAccountId() override
;
25 OAuth2TokenService
* GetTokenService() override
;
26 bool RequestLogin() override
;
29 chromeos::DeviceOAuth2TokenService
* token_service_
;
31 DISALLOW_COPY_AND_ASSIGN(DeviceIdentityProvider
);
34 } // namespace chromeos
36 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_IDENTITY_PROVIDER_H_