diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-21 20:32:21 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-21 20:32:21 +0000 |
commit | cbce8ffb3d90ed63e9fb36407d31f7f6ce8a991d (patch) | |
tree | 4a20baf9dfdd076afba4517d4feef75677c468cf /chrome/browser/search_engines/template_url_model.h | |
parent | 677c8e35386e63fa00e87a03ef5b6e05326dcdbc (diff) | |
download | chromium_src-cbce8ffb3d90ed63e9fb36407d31f7f6ce8a991d.zip chromium_src-cbce8ffb3d90ed63e9fb36407d31f7f6ce8a991d.tar.gz chromium_src-cbce8ffb3d90ed63e9fb36407d31f7f6ce8a991d.tar.bz2 |
Use a NotificationRegistrar to listen for notifications.
BUG=2381
Review URL: http://codereview.chromium.org/115653
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16649 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/search_engines/template_url_model.h')
-rw-r--r-- | chrome/browser/search_engines/template_url_model.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/search_engines/template_url_model.h b/chrome/browser/search_engines/template_url_model.h index 094c506..c0e169b 100644 --- a/chrome/browser/search_engines/template_url_model.h +++ b/chrome/browser/search_engines/template_url_model.h @@ -13,7 +13,7 @@ #include "chrome/browser/history/history_notifications.h" #include "chrome/browser/history/history_types.h" #include "chrome/browser/webdata/web_data_service.h" -#include "chrome/common/notification_observer.h" +#include "chrome/common/notification_registrar.h" class GURL; class PrefService; @@ -217,6 +217,8 @@ class TemplateURLModel : public WebDataServiceConsumer, typedef std::map<std::wstring, const TemplateURL*> KeywordToTemplateMap; typedef std::vector<const TemplateURL*> TemplateURLVector; + typedef std::set<const TemplateURL*> TemplateURLSet; + typedef std::map<std::string, TemplateURLSet> HostToURLsMap; // Helper functor for FindMatchingKeywords(), for finding the range of // keywords which begin with a prefix. @@ -298,6 +300,8 @@ class TemplateURLModel : public WebDataServiceConsumer, // {google:baseSuggestURL}. void GoogleBaseURLChanged(); + NotificationRegistrar registrar_; + // Mapping from keyword to the TemplateURL. KeywordToTemplateMap keyword_to_template_map_; @@ -306,8 +310,6 @@ class TemplateURLModel : public WebDataServiceConsumer, ObserverList<TemplateURLModelObserver> model_observers_; // Maps from host to set of TemplateURLs whose search url host is host. - typedef std::set<const TemplateURL*> TemplateURLSet; - typedef std::map<std::string, TemplateURLSet> HostToURLsMap; HostToURLsMap host_to_urls_map_; // Used to obtain the WebDataService. |