diff options
author | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-06 13:53:02 +0000 |
---|---|---|
committer | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-06 13:53:02 +0000 |
commit | a7b235f62119d86dd6420ec7875f27d089cc9c86 (patch) | |
tree | 6d0da8b398d17b0e02fc71b252e5d02de1f1ccc1 | |
parent | 690d59688a22a3233ebb16a8e81a05f5144db974 (diff) | |
download | chromium_src-a7b235f62119d86dd6420ec7875f27d089cc9c86.zip chromium_src-a7b235f62119d86dd6420ec7875f27d089cc9c86.tar.gz chromium_src-a7b235f62119d86dd6420ec7875f27d089cc9c86.tar.bz2 |
Disable cloud policy for extensions by default.
The flag will be flipped back once the server is ready. For now it'll be
disabled on cloud policy. Note that policy for extensions is still loaded from
the platform policy providers.
BUG=108992
Review URL: https://codereview.chromium.org/107063002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239198 0039d316-1c4b-4281-b951-d872f2087c98
4 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/policy/cloud/cloud_policy_manager.cc b/chrome/browser/policy/cloud/cloud_policy_manager.cc index f02b4ab..e3a01a9 100644 --- a/chrome/browser/policy/cloud/cloud_policy_manager.cc +++ b/chrome/browser/policy/cloud/cloud_policy_manager.cc @@ -110,8 +110,8 @@ void CloudPolicyManager::CreateComponentCloudPolicyService( // Called at most once. DCHECK(!component_policy_service_); - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDisableComponentCloudPolicy) || + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableComponentCloudPolicy) || policy_cache_path.empty()) { return; } diff --git a/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc b/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc index 5f19e12..b80ef5d 100644 --- a/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc +++ b/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc @@ -28,6 +28,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" +#include "components/policy/core/common/policy_switches.h" #include "extensions/common/extension.h" #include "net/url_request/url_request_context_getter.h" #include "policy/proto/cloud_policy.pb.h" @@ -118,6 +119,7 @@ class ComponentCloudPolicyTest : public ExtensionBrowserTest { std::string url = test_server_.GetServiceURL().spec(); CommandLine* command_line = CommandLine::ForCurrentProcess(); command_line->AppendSwitchASCII(::switches::kDeviceManagementUrl, url); + command_line->AppendSwitch(switches::kEnableComponentCloudPolicy); ExtensionBrowserTest::SetUpInProcessBrowserTestFixture(); } diff --git a/components/policy/core/common/policy_switches.cc b/components/policy/core/common/policy_switches.cc index a8cb876..d6491f1 100644 --- a/components/policy/core/common/policy_switches.cc +++ b/components/policy/core/common/policy_switches.cc @@ -16,8 +16,8 @@ const char kCloudPolicyInvalidationDelay[] = "cloud-policy-invalidation-delay"; // Disables pushing cloud policy to Chrome using an invalidation service. const char kDisableCloudPolicyPush[] = "disable-cloud-policy-push"; -// Disables fetching and storing cloud policy for components. -const char kDisableComponentCloudPolicy[] = "disable-component-cloud-policy"; +// Enables fetching and storing cloud policy for components. +const char kEnableComponentCloudPolicy[] = "enable-component-cloud-policy"; #if defined(OS_ANDROID) || defined(OS_IOS) // Registers for cloud policy using the BROWSER client type instead of the diff --git a/components/policy/core/common/policy_switches.h b/components/policy/core/common/policy_switches.h index b17f880..f9ea1cb 100644 --- a/components/policy/core/common/policy_switches.h +++ b/components/policy/core/common/policy_switches.h @@ -14,7 +14,7 @@ namespace switches { POLICY_EXPORT extern const char kCloudPolicyInvalidationDelay[]; POLICY_EXPORT extern const char kDisableCloudPolicyPush[]; -POLICY_EXPORT extern const char kDisableComponentCloudPolicy[]; +POLICY_EXPORT extern const char kEnableComponentCloudPolicy[]; #if defined(OS_ANDROID) || defined(OS_IOS) POLICY_EXPORT extern const char kFakeCloudPolicyType[]; |