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

Unified Diff: chrome/browser/policy/cloud/component_cloud_policy_store.cc

Issue 70863002: Refactored the ComponentCloudPolicyService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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: chrome/browser/policy/cloud/component_cloud_policy_store.cc
diff --git a/chrome/browser/policy/cloud/component_cloud_policy_store.cc b/chrome/browser/policy/cloud/component_cloud_policy_store.cc
index 879fd4b62dc0d0830116c47daf99eda043432010..a6c8d629dc8cdc7f2e24230ec5ee22a64282edb1 100644
--- a/chrome/browser/policy/cloud/component_cloud_policy_store.cc
+++ b/chrome/browser/policy/cloud/component_cloud_policy_store.cc
@@ -66,7 +66,11 @@ ComponentCloudPolicyStore::ComponentCloudPolicyStore(
Delegate* delegate,
ResourceCache* cache)
: delegate_(delegate),
- cache_(cache) {}
+ cache_(cache) {
+ // Allow the store to be created on a different thread than the thread that
+ // will end up using it.
+ DetachFromThread();
+}
ComponentCloudPolicyStore::~ComponentCloudPolicyStore() {
DCHECK(CalledOnValidThread());

Powered by Google App Engine
This is Rietveld 408576698