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

Unified Diff: chrome/browser/ui/webui/options/startup_pages_handler.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/webui/options/startup_pages_handler.h
diff --git a/chrome/browser/ui/webui/options/startup_pages_handler.h b/chrome/browser/ui/webui/options/startup_pages_handler.h
index 98f7f23670ed8b04b30cb82d2b24486b91405f20..4e9e6391f7447983440a1e708c9459ef1f79d9d3 100644
--- a/chrome/browser/ui/webui/options/startup_pages_handler.h
+++ b/chrome/browser/ui/webui/options/startup_pages_handler.h
@@ -9,6 +9,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/prefs/public/pref_change_registrar.h"
+#include "base/prefs/public/pref_observer.h"
#include "chrome/browser/api/prefs/pref_member.h"
#include "chrome/browser/autocomplete/autocomplete_controller_delegate.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
@@ -23,6 +24,7 @@ namespace options {
// Chrome browser options page UI handler.
class StartupPagesHandler : public OptionsPageUIHandler,
public AutocompleteControllerDelegate,
+ public PrefObserver,
public ui::TableModelObserver {
public:
StartupPagesHandler();
@@ -44,10 +46,9 @@ class StartupPagesHandler : public OptionsPageUIHandler,
virtual void OnItemsRemoved(int start, int length) OVERRIDE;
private:
- // content::NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ // PrefObserver implementation.
+ virtual void OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) OVERRIDE;
// Saves the changes that have been made. Called from WebUI.
void CommitChanges(const ListValue* args);
« no previous file with comments | « chrome/browser/ui/webui/options/preferences_browsertest.cc ('k') | chrome/browser/ui/webui/options/startup_pages_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698