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

Unified Diff: chrome/browser/extensions/external_policy_loader.cc

Issue 11377131: Removing PrefObserver usage, batch 4. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 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/extensions/external_policy_loader.cc
diff --git a/chrome/browser/extensions/external_policy_loader.cc b/chrome/browser/extensions/external_policy_loader.cc
index 79ddb8dbe8bc7cc192575fadac0fd23fd05ae7e2..6df0304c870a5e1dfe6639d87cfb2028213ad41e 100644
--- a/chrome/browser/extensions/external_policy_loader.cc
+++ b/chrome/browser/extensions/external_policy_loader.cc
@@ -41,7 +41,9 @@ bool CheckExtension(const std::string& id, const std::string& update_url) {
ExternalPolicyLoader::ExternalPolicyLoader(Profile* profile)
: profile_(profile) {
pref_change_registrar_.Init(profile_->GetPrefs());
- pref_change_registrar_.Add(prefs::kExtensionInstallForceList, this);
+ pref_change_registrar_.Add(prefs::kExtensionInstallForceList,
+ base::Bind(&ExternalPolicyLoader::StartLoading,
+ base::Unretained(this)));
notification_registrar_.Add(this,
chrome::NOTIFICATION_PROFILE_DESTROYED,
content::Source<Profile>(profile_));
@@ -88,12 +90,4 @@ void ExternalPolicyLoader::Observe(
}
}
-void ExternalPolicyLoader::OnPreferenceChanged(PrefServiceBase* service,
- const std::string& pref_name) {
- if (service == profile_->GetPrefs()) {
- DCHECK_EQ(std::string(prefs::kExtensionInstallForceList), pref_name);
- StartLoading();
- }
-}
-
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/external_policy_loader.h ('k') | chrome/browser/media_gallery/media_file_system_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698