diff options
author | Xiyuan Xia <xiyuan@chromium.org> | 2015-01-06 09:13:04 -0800 |
---|---|---|
committer | Xiyuan Xia <xiyuan@chromium.org> | 2015-01-06 17:14:55 +0000 |
commit | fd8849f4968dd24231e3c2decac89a1e8d1a1e94 (patch) | |
tree | 6f8c558aeb681f75ce589307c7cf3f33b3363767 | |
parent | 5a80ea10ffb22b4419ef664ed1a4580f7b3ad0ce (diff) | |
download | chromium_src-fd8849f4968dd24231e3c2decac89a1e8d1a1e94.zip chromium_src-fd8849f4968dd24231e3c2decac89a1e8d1a1e94.tar.gz chromium_src-fd8849f4968dd24231e3c2decac89a1e8d1a1e94.tar.bz2 |
Merge "kiosk: No DeviceLocalAccountExternalPolicyLoader for consumer mode."
> Review URL: https://codereview.chromium.org/723273002
>
> Cr-Commit-Position: refs/heads/master@{#304549}
> (cherry picked from commit 8a9e65696b4256105e75b8b68ccc64fd71fe6c5c)
BUG=393352,446257
TBR=xiyuan@chromium.org
Review URL: https://codereview.chromium.org/840583002
Cr-Commit-Position: refs/branch-heads/2214@{#385}
Cr-Branched-From: 03655fd3f6d72165dc3c9bd2c89807305316fe6c-refs/heads/master@{#303346}
3 files changed, 10 insertions, 10 deletions
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_external_loader.cc b/chrome/browser/chromeos/app_mode/kiosk_app_external_loader.cc index 0fefc06..fa977ac 100644 --- a/chrome/browser/chromeos/app_mode/kiosk_app_external_loader.cc +++ b/chrome/browser/chromeos/app_mode/kiosk_app_external_loader.cc @@ -4,6 +4,7 @@ #include "chrome/browser/chromeos/app_mode/kiosk_app_external_loader.h" +#include "base/values.h" #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" namespace chromeos { @@ -16,13 +17,13 @@ KioskAppExternalLoader::~KioskAppExternalLoader() { void KioskAppExternalLoader::SetCurrentAppExtensions( scoped_ptr<base::DictionaryValue> prefs) { - kiosk_apps_.Swap(prefs.get()); + prefs_ = prefs.Pass(); StartLoading(); } void KioskAppExternalLoader::StartLoading() { - prefs_.reset(kiosk_apps_.DeepCopy()); - LoadFinished(); + if (prefs_) + LoadFinished(); } } // namespace chromeos diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_external_loader.h b/chrome/browser/chromeos/app_mode/kiosk_app_external_loader.h index be8cbcb..2cc5192 100644 --- a/chrome/browser/chromeos/app_mode/kiosk_app_external_loader.h +++ b/chrome/browser/chromeos/app_mode/kiosk_app_external_loader.h @@ -5,9 +5,8 @@ #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_EXTERNAL_LOADER_H_ #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_EXTERNAL_LOADER_H_ -#include "base/memory/scoped_ptr.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" -#include "base/values.h" #include "chrome/browser/extensions/external_loader.h" namespace chromeos { @@ -24,12 +23,10 @@ class KioskAppExternalLoader void SetCurrentAppExtensions(scoped_ptr<base::DictionaryValue> prefs); // extensions::ExternalLoader overrides: - virtual void StartLoading() override; + void StartLoading() override; private: - virtual ~KioskAppExternalLoader(); - - base::DictionaryValue kiosk_apps_; + ~KioskAppExternalLoader() override; DISALLOW_COPY_AND_ASSIGN(KioskAppExternalLoader); }; diff --git a/chrome/browser/extensions/external_provider_impl.cc b/chrome/browser/extensions/external_provider_impl.cc index e62599a..963ccc4 100644 --- a/chrome/browser/extensions/external_provider_impl.cc +++ b/chrome/browser/extensions/external_provider_impl.cc @@ -374,7 +374,9 @@ void ExternalProviderImpl::CreateExternalProviders( const user_manager::User* user = chromeos::ProfileHelper::Get()->GetUserByProfile(profile); policy::DeviceLocalAccount::Type account_type; - if (user && policy::IsDeviceLocalAccountUser(user->email(), &account_type)) { + if (user && + connector->IsEnterpriseManaged() && + policy::IsDeviceLocalAccountUser(user->email(), &account_type)) { if (account_type == policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION) is_chrome_os_public_session = true; policy::DeviceLocalAccountPolicyBroker* broker = |