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

Side by Side Diff: chrome/browser/prefs/pref_notifier.cc

Issue 3660002: Rename ChromeThread to BrowserThread Part13: (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: Created 10 years, 2 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/prefs/pref_notifier.h" 5 #include "chrome/browser/prefs/pref_notifier.h"
6 6
7 #include "base/stl_util-inl.h" 7 #include "base/stl_util-inl.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/policy/configuration_policy_pref_store.h" 9 #include "chrome/browser/policy/configuration_policy_pref_store.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 const NotificationDetails& details) { 120 const NotificationDetails& details) {
121 using policy::ConfigurationPolicyPrefStore; 121 using policy::ConfigurationPolicyPrefStore;
122 122
123 if (type == NotificationType::POLICY_CHANGED) { 123 if (type == NotificationType::POLICY_CHANGED) {
124 PrefValueStore::AfterRefreshCallback* callback = 124 PrefValueStore::AfterRefreshCallback* callback =
125 NewCallback(this, 125 NewCallback(this,
126 &PrefNotifier::FireObserversForRefreshedManagedPrefs); 126 &PrefNotifier::FireObserversForRefreshedManagedPrefs);
127 // The notification of the policy refresh can come from any thread, 127 // The notification of the policy refresh can come from any thread,
128 // but the manipulation of the PrefValueStore must happen on the UI 128 // but the manipulation of the PrefValueStore must happen on the UI
129 // thread, thus the policy refresh must be explicitly started on it. 129 // thread, thus the policy refresh must be explicitly started on it.
130 ChromeThread::PostTask( 130 BrowserThread::PostTask(
131 ChromeThread::UI, FROM_HERE, 131 BrowserThread::UI, FROM_HERE,
132 NewRunnableMethod( 132 NewRunnableMethod(
133 pref_value_store_, 133 pref_value_store_,
134 &PrefValueStore::RefreshPolicyPrefs, 134 &PrefValueStore::RefreshPolicyPrefs,
135 ConfigurationPolicyPrefStore::CreateManagedPolicyPrefStore(), 135 ConfigurationPolicyPrefStore::CreateManagedPolicyPrefStore(),
136 ConfigurationPolicyPrefStore::CreateRecommendedPolicyPrefStore(), 136 ConfigurationPolicyPrefStore::CreateRecommendedPolicyPrefStore(),
137 callback)); 137 callback));
138 } 138 }
139 } 139 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/config_dir_policy_provider_unittest.cc ('k') | chrome/browser/prefs/pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698