Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(500)

Unified Diff: components/policy/core/common/cloud/cloud_policy_manager.cc

Issue 756133002: Purge cache when the server removes the policy for an extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win build Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/policy/core/common/cloud/cloud_policy_manager.cc
diff --git a/components/policy/core/common/cloud/cloud_policy_manager.cc b/components/policy/core/common/cloud/cloud_policy_manager.cc
index 2e039dc4b9c92908c9188a72b7d7345c4a56e66b..32ffbae74edbe529d8ac1f6ceb70d7b308e25a9a 100644
--- a/components/policy/core/common/cloud/cloud_policy_manager.cc
+++ b/components/policy/core/common/cloud/cloud_policy_manager.cc
@@ -108,12 +108,16 @@ void CloudPolicyManager::GetChromePolicy(PolicyMap* policy_map) {
void CloudPolicyManager::CreateComponentCloudPolicyService(
const base::FilePath& policy_cache_path,
- const scoped_refptr<net::URLRequestContextGetter>& request_context) {
+ const scoped_refptr<net::URLRequestContextGetter>& request_context,
+ CloudPolicyClient* client) {
#if !defined(OS_ANDROID) && !defined(OS_IOS)
// Init() must have been called.
- DCHECK(schema_registry());
+ CHECK(schema_registry());
// Called at most once.
- DCHECK(!component_policy_service_);
+ CHECK(!component_policy_service_);
+ // The core can't be connected yet.
+ // See the comments on ComponentCloudPolicyService for the details.
+ CHECK(!core()->client());
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableComponentCloudPolicy) ||
@@ -130,6 +134,7 @@ void CloudPolicyManager::CreateComponentCloudPolicyService(
this,
schema_registry(),
core(),
+ client,
resource_cache.Pass(),
request_context,
file_task_runner_,

Powered by Google App Engine
This is Rietveld 408576698