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/custom_handlers | |
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/custom_handlers')
-rw-r--r-- | chrome/browser/custom_handlers/protocol_handler_registry.cc | 3 | ||||
-rw-r--r-- | chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc | 11 |
2 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry.cc b/chrome/browser/custom_handlers/protocol_handler_registry.cc index 7c7504b..bc20774 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry.cc +++ b/chrome/browser/custom_handlers/protocol_handler_registry.cc @@ -15,6 +15,7 @@ #include "chrome/browser/net/chrome_url_request_context.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile_io_data.h" +#include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "content/browser/browser_thread.h" @@ -476,7 +477,7 @@ int ProtocolHandlerRegistry::GetHandlerIndex(const std::string& scheme) const { void ProtocolHandlerRegistry::NotifyChanged() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); NotificationService::current()->Notify( - NotificationType::PROTOCOL_HANDLER_REGISTRY_CHANGED, + chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED, Source<Profile>(profile_), NotificationService::NoDetails()); } diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc index c628262..93a7ba8 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc +++ b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc @@ -12,6 +12,7 @@ #include "base/task.h" #include "base/utf_string_conversions.h" #include "chrome/browser/custom_handlers/protocol_handler.h" +#include "chrome/common/chrome_notification_types.h" #include "chrome/test/testing_browser_process.h" #include "chrome/test/testing_browser_process_test.h" #include "chrome/test/testing_pref_service.h" @@ -67,20 +68,20 @@ class NotificationCounter : public NotificationObserver { : events_(0), notification_registrar_() { notification_registrar_.Add(this, - NotificationType::PROTOCOL_HANDLER_REGISTRY_CHANGED, + chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED, NotificationService::AllSources()); } ~NotificationCounter() { notification_registrar_.Remove(this, - NotificationType::PROTOCOL_HANDLER_REGISTRY_CHANGED, + chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED, NotificationService::AllSources()); } int events() { return events_; } bool notified() { return events_ > 0; } void Clear() { events_ = 0; } - virtual void Observe(NotificationType type, + virtual void Observe(int type, const NotificationSource& source, const NotificationDetails& details) { ++events_; @@ -97,11 +98,11 @@ class QueryProtocolHandlerOnChange : public NotificationObserver { called_(false), notification_registrar_() { notification_registrar_.Add(this, - NotificationType::PROTOCOL_HANDLER_REGISTRY_CHANGED, + chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED, NotificationService::AllSources()); } - virtual void Observe(NotificationType type, + virtual void Observe(int type, const NotificationSource& source, const NotificationDetails& details) { std::vector<std::string> output; |