| Index: chrome/browser/extensions/api/storage/managed_value_store_cache.cc
|
| diff --git a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
|
| index 465ddbabced6eb7e5d5d98351270743c9aafdf4d..e45bb33ed7063a8cef53036cdcbcee550ae36d13 100644
|
| --- a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
|
| +++ b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
|
| @@ -39,6 +39,10 @@
|
| #include "extensions/common/manifest_constants.h"
|
| #include "extensions/common/one_shot_event.h"
|
|
|
| +#if defined(OS_CHROMEOS)
|
| +#include "chrome/browser/chromeos/profiles/profile_helper.h"
|
| +#endif
|
| +
|
| using content::BrowserContext;
|
| using content::BrowserThread;
|
|
|
| @@ -235,7 +239,7 @@ ManagedValueStoreCache::ManagedValueStoreCache(
|
| const scoped_refptr<ValueStoreFactory>& factory,
|
| const scoped_refptr<SettingsObserverList>& observers)
|
| : profile_(Profile::FromBrowserContext(context)),
|
| - policy_domain_(policy::POLICY_DOMAIN_EXTENSIONS),
|
| + policy_domain_(GetPolicyDomain(profile_)),
|
| policy_service_(
|
| policy::ProfilePolicyConnectorFactory::GetForBrowserContext(context)
|
| ->policy_service()),
|
| @@ -328,6 +332,17 @@ void ManagedValueStoreCache::OnPolicyUpdated(const policy::PolicyNamespace& ns,
|
| base::Passed(current.DeepCopy())));
|
| }
|
|
|
| +// static
|
| +policy::PolicyDomain ManagedValueStoreCache::GetPolicyDomain(Profile* profile) {
|
| +#if defined(OS_CHROMEOS)
|
| + return chromeos::ProfileHelper::IsSigninProfile(profile)
|
| + ? policy::POLICY_DOMAIN_SIGNIN_EXTENSIONS
|
| + : policy::POLICY_DOMAIN_EXTENSIONS;
|
| +#else
|
| + return policy::POLICY_DOMAIN_EXTENSIONS;
|
| +#endif
|
| +}
|
| +
|
| void ManagedValueStoreCache::UpdatePolicyOnFILE(
|
| const std::string& extension_id,
|
| std::unique_ptr<policy::PolicyMap> current_policy) {
|
|
|