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

Unified Diff: chrome/browser/ui/alternate_error_tab_observer.h

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
Index: chrome/browser/ui/alternate_error_tab_observer.h
diff --git a/chrome/browser/ui/alternate_error_tab_observer.h b/chrome/browser/ui/alternate_error_tab_observer.h
index d5da9404ec1f6d5e79ae5cafe1bd7375682d63cd..071dea8f10a4df504a708c91a2abbaa772de0d6d 100644
--- a/chrome/browser/ui/alternate_error_tab_observer.h
+++ b/chrome/browser/ui/alternate_error_tab_observer.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_ALTERNATE_ERROR_TAB_OBSERVER_H_
#include "base/prefs/public/pref_change_registrar.h"
+#include "base/prefs/public/pref_observer.h"
#include "chrome/browser/prefs/pref_service.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -18,7 +19,8 @@ class Profile;
class AlternateErrorPageTabObserver
: public content::WebContentsObserver,
public content::NotificationObserver,
- public content::WebContentsUserData<AlternateErrorPageTabObserver> {
+ public content::WebContentsUserData<AlternateErrorPageTabObserver>,
+ public PrefObserver {
public:
virtual ~AlternateErrorPageTabObserver();
@@ -37,6 +39,10 @@ class AlternateErrorPageTabObserver
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // PrefObserver overrides:
+ virtual void OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) OVERRIDE;
+
// Internal helpers ----------------------------------------------------------
// Returns the server that can provide alternate error pages. If the returned
« no previous file with comments | « chrome/browser/translate/translate_manager_browsertest.cc ('k') | chrome/browser/ui/alternate_error_tab_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698