summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/policy/cloud/cloud_policy_manager.cc4
-rw-r--r--chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc2
-rw-r--r--components/policy/core/common/policy_switches.cc4
-rw-r--r--components/policy/core/common/policy_switches.h2
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[];