diff options
author | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 17:46:36 +0000 |
---|---|---|
committer | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 17:46:36 +0000 |
commit | dd5e392a53c7aa927a9e6cd4ad6a46241b25cbaa (patch) | |
tree | ac02ba00655f523156fd95adc98e6661bab31a91 /chrome/browser/invalidation/device_invalidation_auth_provider_chromeos.cc | |
parent | e0bc89ec46f87d8da3d6547f6198bf98546ce6ed (diff) | |
download | chromium_src-dd5e392a53c7aa927a9e6cd4ad6a46241b25cbaa.zip chromium_src-dd5e392a53c7aa927a9e6cd4ad6a46241b25cbaa.tar.gz chromium_src-dd5e392a53c7aa927a9e6cd4ad6a46241b25cbaa.tar.bz2 |
Make invalidations work for Chrome OS Kiosk Apps.
Kiosk Apps don't have a user logged in, so SigninManager and
ProfileOAuth2TokenService don't work. However, Kiosk Apps have access
to a device-level robot account for identity. Wire this up with the
invalidation code by breaking out the authentication-related pieces
into a separate interface and providing implementations both for the
regular Profile case as well as Kiosk Apps. The appropriate
implementation gets selected by InvalidationServiceFactory.
BUG=chromium:269455
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=258522
Review URL: https://codereview.chromium.org/179843002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258623 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/invalidation/device_invalidation_auth_provider_chromeos.cc')
-rw-r--r-- | chrome/browser/invalidation/device_invalidation_auth_provider_chromeos.cc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/chrome/browser/invalidation/device_invalidation_auth_provider_chromeos.cc b/chrome/browser/invalidation/device_invalidation_auth_provider_chromeos.cc new file mode 100644 index 0000000..11aa3c6 --- /dev/null +++ b/chrome/browser/invalidation/device_invalidation_auth_provider_chromeos.cc @@ -0,0 +1,27 @@ +// 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. + +#include "chrome/browser/invalidation/device_invalidation_auth_provider_chromeos.h" + +#include "chrome/browser/chromeos/settings/device_oauth2_token_service.h" + +namespace invalidation { + +DeviceInvalidationAuthProvider::DeviceInvalidationAuthProvider( + chromeos::DeviceOAuth2TokenService* token_service) + : token_service_(token_service) {} + +DeviceInvalidationAuthProvider::~DeviceInvalidationAuthProvider() {} + +std::string DeviceInvalidationAuthProvider::GetAccountId() { + return token_service_->GetRobotAccountId(); +} + +OAuth2TokenService* DeviceInvalidationAuthProvider::GetTokenService() { + return token_service_; +} + +bool DeviceInvalidationAuthProvider::ShowLoginUI() { return false; } + +} // namespace invalidation |