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

Unified Diff: chrome/browser/printing/print_view_manager.cc

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit 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
« no previous file with comments | « chrome/browser/printing/print_view_manager.h ('k') | chrome/browser/profiles/gaia_info_update_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_view_manager.cc
diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc
index 56c58ca6693a47510f67eb722bcff7707cb36b10..cad5695004979547065700eee863ec5f7a757cba 100644
--- a/chrome/browser/printing/print_view_manager.cc
+++ b/chrome/browser/printing/print_view_manager.cc
@@ -389,10 +389,6 @@ void PrintViewManager::Observe(int type,
OnNotifyPrintJobEvent(*content::Details<JobEventDetails>(details).ptr());
break;
}
- case chrome::NOTIFICATION_PREF_CHANGED: {
- UpdateScriptedPrintingBlocked();
- break;
- }
case chrome::NOTIFICATION_CONTENT_BLOCKED_STATE_CHANGED: {
tab_content_blocked_ = *content::Details<const bool>(details).ptr();
UpdateScriptedPrintingBlocked();
@@ -405,6 +401,11 @@ void PrintViewManager::Observe(int type,
}
}
+void PrintViewManager::OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) {
+ UpdateScriptedPrintingBlocked();
+}
+
void PrintViewManager::OnNotifyPrintJobEvent(
const JobEventDetails& event_details) {
switch (event_details.type()) {
« no previous file with comments | « chrome/browser/printing/print_view_manager.h ('k') | chrome/browser/profiles/gaia_info_update_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698