diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-01 18:16:56 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-01 18:16:56 +0000 |
commit | bfd04a62ce610d7bb61dbb78811dccbed23589b7 (patch) | |
tree | 70bb228c0f00ba1c12c584efd569daccf96b4026 /chrome/browser/ssl/ssl_manager.cc | |
parent | a814d863440f0a154a7299f2d8b440f405c7700e (diff) | |
download | chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.zip chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.tar.gz chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.tar.bz2 |
Remove most header file dependencies on the notification type list. It is
really painful to add more types, since lots of headers include the
notification service to derive from the notification observer. This splits that
out, so much less of the project should end up including notification_types.h
---Paths modified but not in any changelist:
Review URL: http://codereview.chromium.org/19744
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9020 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl/ssl_manager.cc')
-rw-r--r-- | chrome/browser/ssl/ssl_manager.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/chrome/browser/ssl/ssl_manager.cc b/chrome/browser/ssl/ssl_manager.cc index 49227e2..99440b9 100644 --- a/chrome/browser/ssl/ssl_manager.cc +++ b/chrome/browser/ssl/ssl_manager.cc @@ -102,15 +102,15 @@ SSLManager::SSLManager(NavigationController* controller, Delegate* delegate) delegate_ = SSLPolicy::GetDefaultPolicy(); // Subscribe to various notifications. - registrar_.Add(this, NOTIFY_NAV_ENTRY_COMMITTED, + registrar_.Add(this, NotificationType::NAV_ENTRY_COMMITTED, Source<NavigationController>(controller_)); - registrar_.Add(this, NOTIFY_FAIL_PROVISIONAL_LOAD_WITH_ERROR, + registrar_.Add(this, NotificationType::FAIL_PROVISIONAL_LOAD_WITH_ERROR, Source<NavigationController>(controller_)); - registrar_.Add(this, NOTIFY_RESOURCE_RESPONSE_STARTED, + registrar_.Add(this, NotificationType::RESOURCE_RESPONSE_STARTED, Source<NavigationController>(controller_)); - registrar_.Add(this, NOTIFY_RESOURCE_RECEIVED_REDIRECT, + registrar_.Add(this, NotificationType::RESOURCE_RECEIVED_REDIRECT, Source<NavigationController>(controller_)); - registrar_.Add(this, NOTIFY_LOAD_FROM_MEMORY_CACHE, + registrar_.Add(this, NotificationType::LOAD_FROM_MEMORY_CACHE, Source<NavigationController>(controller_)); } @@ -496,27 +496,27 @@ void SSLManager::Observe(NotificationType type, DCHECK(source == Source<NavigationController>(controller_)); // Dispatch by type. - switch (type) { - case NOTIFY_NAV_ENTRY_COMMITTED: + switch (type.value) { + case NotificationType::NAV_ENTRY_COMMITTED: DidCommitProvisionalLoad(details); break; - case NOTIFY_FAIL_PROVISIONAL_LOAD_WITH_ERROR: + case NotificationType::FAIL_PROVISIONAL_LOAD_WITH_ERROR: DidFailProvisionalLoadWithError( Details<ProvisionalLoadDetails>(details).ptr()); break; - case NOTIFY_RESOURCE_RESPONSE_STARTED: + case NotificationType::RESOURCE_RESPONSE_STARTED: DidStartResourceResponse(Details<ResourceRequestDetails>(details).ptr()); break; - case NOTIFY_RESOURCE_RECEIVED_REDIRECT: + case NotificationType::RESOURCE_RECEIVED_REDIRECT: DidReceiveResourceRedirect( Details<ResourceRedirectDetails>(details).ptr()); break; - case NOTIFY_LOAD_FROM_MEMORY_CACHE: + case NotificationType::LOAD_FROM_MEMORY_CACHE: DidLoadFromMemoryCache( Details<LoadFromMemoryCacheDetails>(details).ptr()); break; - default: - NOTREACHED() << "The SSLManager received an unexpected notification."; + default: + NOTREACHED() << "The SSLManager received an unexpected notification."; } } @@ -613,7 +613,7 @@ void SSLManager::DidCommitProvisionalLoad( if (changed) { // Only send the notification when something actually changed. NotificationService::current()->Notify( - NOTIFY_SSL_STATE_CHANGED, + NotificationType::SSL_STATE_CHANGED, Source<NavigationController>(controller_), NotificationService::NoDetails()); } |