diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-10 15:52:27 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-10 15:52:27 +0000 |
commit | 43211582b1fa8c69136385250e7b0446cf364b5c (patch) | |
tree | 655ab01543012b6fd5699dee8fab92876959b7d9 /chrome/browser/search_engines/template_url_service.cc | |
parent | d43970a7ceee5fc5433787b0f28b64234a4039f2 (diff) | |
download | chromium_src-43211582b1fa8c69136385250e7b0446cf364b5c.zip chromium_src-43211582b1fa8c69136385250e7b0446cf364b5c.tar.gz chromium_src-43211582b1fa8c69136385250e7b0446cf364b5c.tar.bz2 |
Moving notification types which are chrome specific to a new header file chrome_notification_types.h.
This file lives in chrome\common. The chrome specific notifications start from NOTIFICATION_CONTENT_END
which defines the end of the enum used by content to define notification types. The notificaton_type.h file
in content\common has been renamed to content_notification_types.h
BUG=76698
Review URL: http://codereview.chromium.org/7327007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91972 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/search_engines/template_url_service.cc')
-rw-r--r-- | chrome/browser/search_engines/template_url_service.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/search_engines/template_url_service.cc b/chrome/browser/search_engines/template_url_service.cc index 1777ebd..3c0db83 100644 --- a/chrome/browser/search_engines/template_url_service.cc +++ b/chrome/browser/search_engines/template_url_service.cc @@ -28,6 +28,7 @@ #include "chrome/browser/search_engines/template_url_service_observer.h" #include "chrome/browser/search_engines/template_url_prepopulate_data.h" #include "chrome/browser/search_engines/util.h" +#include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/env_vars.h" #include "chrome/common/extensions/extension.h" @@ -579,19 +580,19 @@ string16 TemplateURLService::GetKeywordShortName(const string16& keyword, return string16(); } -void TemplateURLService::Observe(NotificationType type, +void TemplateURLService::Observe(int type, const NotificationSource& source, const NotificationDetails& details) { - if (type == NotificationType::HISTORY_URL_VISITED) { + if (type == chrome::NOTIFICATION_HISTORY_URL_VISITED) { Details<history::URLVisitedDetails> visit_details(details); if (!loaded()) visits_to_add_.push_back(*visit_details.ptr()); else UpdateKeywordSearchTermsForURL(*visit_details.ptr()); - } else if (type == NotificationType::GOOGLE_URL_UPDATED) { + } else if (type == chrome::NOTIFICATION_GOOGLE_URL_UPDATED) { if (loaded_) GoogleBaseURLChanged(); - } else if (type == NotificationType::PREF_CHANGED) { + } else if (type == chrome::NOTIFICATION_PREF_CHANGED) { const std::string* pref_name = Details<std::string>(details).ptr(); if (!pref_name || default_search_prefs_->IsObserved(*pref_name)) { // A preference related to default search engine has changed. @@ -655,13 +656,13 @@ void TemplateURLService::Init(const Initializer* initializers, // db, which will mean we no longer need this notification and the history // backend can handle automatically adding the search terms as the user // navigates. - registrar_.Add(this, NotificationType::HISTORY_URL_VISITED, + registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URL_VISITED, Source<Profile>(profile_->GetOriginalProfile())); PrefService* prefs = GetPrefs(); default_search_prefs_.reset( PrefSetObserver::CreateDefaultSearchPrefSetObserver(prefs, this)); } - registrar_.Add(this, NotificationType::GOOGLE_URL_UPDATED, + registrar_.Add(this, chrome::NOTIFICATION_GOOGLE_URL_UPDATED, NotificationService::AllSources()); if (num_initializers > 0) { @@ -775,7 +776,7 @@ void TemplateURLService::ChangeToLoadedState() { void TemplateURLService::NotifyLoaded() { NotificationService::current()->Notify( - NotificationType::TEMPLATE_URL_SERVICE_LOADED, + chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED, Source<TemplateURLService>(this), NotificationService::NoDetails()); @@ -1266,7 +1267,7 @@ void TemplateURLService::RemoveNoNotify(const TemplateURL* template_url) { Source<Profile> source(profile_); TemplateURLID id = template_url->id(); NotificationService::current()->Notify( - NotificationType::TEMPLATE_URL_REMOVED, + chrome::NOTIFICATION_TEMPLATE_URL_REMOVED, source, Details<TemplateURLID>(&id)); } |