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

Unified Diff: chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc

Issue 11414083: Remove PrefObserver usage, batch 9. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to sort-of good revision (r169014). 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/printing/cloud_print/cloud_print_proxy_service.cc
diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc b/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc
index 18ed40dfa27f60df8c1bf8dff464806f4e87aae2..cf16173485d3ef21574544c5feac59afd0d6239d 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc
+++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc
@@ -89,7 +89,12 @@ void CloudPrintProxyService::Initialize() {
}
pref_change_registrar_.Init(profile_->GetPrefs());
- pref_change_registrar_.Add(prefs::kCloudPrintProxyEnabled, this);
+ pref_change_registrar_.Add(
+ prefs::kCloudPrintProxyEnabled,
+ base::Bind(
+ base::IgnoreResult(
+ &CloudPrintProxyService::ApplyCloudPrintConnectorPolicy),
+ base::Unretained(this)));
}
void CloudPrintProxyService::RefreshStatusFromService() {
@@ -207,11 +212,6 @@ void CloudPrintProxyService::OnCloudPrintSetupClosed() {
FROM_HERE, base::Bind(&browser::EndKeepAlive));
}
-void CloudPrintProxyService::OnPreferenceChanged(PrefServiceBase* service,
- const std::string& pref_name) {
- ApplyCloudPrintConnectorPolicy();
-}
-
void CloudPrintProxyService::RefreshCloudPrintProxyStatus() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
ServiceProcessControl* process_control = GetServiceProcessControl();
« no previous file with comments | « chrome/browser/printing/cloud_print/cloud_print_proxy_service.h ('k') | chrome/browser/printing/print_view_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698