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

Unified Diff: chrome/browser/search_engines/template_url_service.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/search_engines/template_url_service.h
diff --git a/chrome/browser/search_engines/template_url_service.h b/chrome/browser/search_engines/template_url_service.h
index bc62ff53043183133dd897364659a38a86a89d27..510f11c51c00327a2ec5098933650e4b70618bcf 100644
--- a/chrome/browser/search_engines/template_url_service.h
+++ b/chrome/browser/search_engines/template_url_service.h
@@ -15,6 +15,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "base/prefs/public/pref_change_registrar.h"
+#include "base/prefs/public/pref_observer.h"
#include "chrome/browser/profiles/profile_keyed_service.h"
#include "chrome/browser/search_engines/template_url_id.h"
#include "chrome/browser/webdata/web_data_service.h"
@@ -67,6 +68,7 @@ struct URLVisitedDetails;
class TemplateURLService : public WebDataServiceConsumer,
public ProfileKeyedService,
public content::NotificationObserver,
+ public PrefObserver,
public syncer::SyncableService {
public:
typedef std::map<std::string, std::string> QueryTerms;
@@ -260,10 +262,15 @@ class TemplateURLService : public WebDataServiceConsumer,
string16 GetKeywordShortName(const string16& keyword,
bool* is_extension_keyword);
+ // 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;
+
// syncer::SyncableService implementation.
// Returns all syncable TemplateURLs from this model as SyncData. This should
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_tab_observer.cc ('k') | chrome/browser/search_engines/template_url_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698