diff options
Diffstat (limited to 'chrome/browser/chromeos/settings/device_identity_provider.h')
-rw-r--r-- | chrome/browser/chromeos/settings/device_identity_provider.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/settings/device_identity_provider.h b/chrome/browser/chromeos/settings/device_identity_provider.h new file mode 100644 index 0000000..8007574 --- /dev/null +++ b/chrome/browser/chromeos/settings/device_identity_provider.h @@ -0,0 +1,36 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_IDENTITY_PROVIDER_H_ +#define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_IDENTITY_PROVIDER_H_ + +#include "base/macros.h" +#include "google_apis/gaia/identity_provider.h" + +namespace chromeos { + +class DeviceOAuth2TokenService; + +// Identity provider implementation backed by DeviceOAuth2TokenService. +class DeviceIdentityProvider : public IdentityProvider { + public: + explicit DeviceIdentityProvider( + chromeos::DeviceOAuth2TokenService* token_service); + virtual ~DeviceIdentityProvider(); + + // IdentityProvider: + virtual std::string GetActiveUsername() OVERRIDE; + virtual std::string GetActiveAccountId() OVERRIDE; + virtual OAuth2TokenService* GetTokenService() OVERRIDE; + virtual bool RequestLogin() OVERRIDE; + + private: + chromeos::DeviceOAuth2TokenService* token_service_; + + DISALLOW_COPY_AND_ASSIGN(DeviceIdentityProvider); +}; + +} // namespace chromeos + +#endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_IDENTITY_PROVIDER_H_ |