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 1497d9f70933a3fb8510aab46377ea300a407a0a..2864c75d6bf53a25abeb005bb843e68de0ec6d2d 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; |
@@ -238,7 +242,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()), |
@@ -331,6 +335,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) { |