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

Unified Diff: chrome/browser/printing/print_view_manager.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
« 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 410c1f44fd7f84372a108dacc2618ad24519c37c..bddbeb9d64965ab04874e77ba38d5560a6d15fb9 100644
--- a/chrome/browser/printing/print_view_manager.cc
+++ b/chrome/browser/printing/print_view_manager.cc
@@ -80,9 +80,11 @@ PrintViewManager::PrintViewManager(content::WebContents* web_contents)
content::Source<content::WebContents>(web_contents));
Profile* profile =
Profile::FromBrowserContext(web_contents->GetBrowserContext());
- printing_enabled_.Init(prefs::kPrintingEnabled,
- profile->GetPrefs(),
- this);
+ printing_enabled_.Init(
+ prefs::kPrintingEnabled,
+ profile->GetPrefs(),
+ base::Bind(&PrintViewManager::UpdateScriptedPrintingBlocked,
+ base::Unretained(this)));
}
PrintViewManager::~PrintViewManager() {
@@ -394,11 +396,6 @@ 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