diff options
Diffstat (limited to 'chrome/browser/ssl')
-rw-r--r-- | chrome/browser/ssl/ssl_blocking_page.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ssl/ssl_blocking_page.h | 2 | ||||
-rw-r--r-- | chrome/browser/ssl/ssl_manager.cc | 28 | ||||
-rw-r--r-- | chrome/browser/ssl/ssl_manager.h | 2 | ||||
-rw-r--r-- | chrome/browser/ssl/ssl_policy.cc | 6 |
5 files changed, 23 insertions, 19 deletions
diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc index 96d0003..313908e 100644 --- a/chrome/browser/ssl/ssl_blocking_page.cc +++ b/chrome/browser/ssl/ssl_blocking_page.cc @@ -5,6 +5,7 @@ #include "chrome/browser/ssl/ssl_blocking_page.h" #include "base/string_piece.h" +#include "base/values.h" #include "chrome/browser/browser.h" #include "chrome/browser/browser_resources.h" #include "chrome/browser/cert_store.h" @@ -15,6 +16,7 @@ #include "chrome/browser/tab_contents/web_contents.h" #include "chrome/common/jstemplate_builder.h" #include "chrome/common/l10n_util.h" +#include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" #include "chrome/common/resource_bundle.h" @@ -80,7 +82,7 @@ void SSLBlockingPage::UpdateEntry(NavigationEntry* entry) { entry->ssl().set_cert_status(ssl_info.cert_status); entry->ssl().set_security_bits(ssl_info.security_bits); NotificationService::current()->Notify( - NOTIFY_SSL_STATE_CHANGED, + NotificationType::SSL_STATE_CHANGED, Source<NavigationController>(web->controller()), NotificationService::NoDetails()); } diff --git a/chrome/browser/ssl/ssl_blocking_page.h b/chrome/browser/ssl/ssl_blocking_page.h index c3c2289..5ea0658 100644 --- a/chrome/browser/ssl/ssl_blocking_page.h +++ b/chrome/browser/ssl/ssl_blocking_page.h @@ -11,6 +11,8 @@ #include "chrome/browser/ssl/ssl_manager.h" #include "chrome/views/decision.h" +class DictionaryValue; + // This class is responsible for showing/hiding the interstitial page that is // shown when a certificate error happens. // It deletes itself when the interstitial page is closed. 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()); } diff --git a/chrome/browser/ssl/ssl_manager.h b/chrome/browser/ssl/ssl_manager.h index a58f3fe..3294e42 100644 --- a/chrome/browser/ssl/ssl_manager.h +++ b/chrome/browser/ssl/ssl_manager.h @@ -14,8 +14,8 @@ #include "chrome/browser/renderer_host/resource_dispatcher_host.h" #include "chrome/browser/tab_contents/provisional_load_details.h" #include "chrome/browser/tab_contents/security_style.h" +#include "chrome/common/notification_observer.h" #include "chrome/common/notification_registrar.h" -#include "chrome/common/notification_service.h" #include "chrome/common/render_messages.h" #include "googleurl/src/gurl.h" #include "net/base/net_errors.h" diff --git a/chrome/browser/ssl/ssl_policy.cc b/chrome/browser/ssl/ssl_policy.cc index 61aada3..1784deb 100644 --- a/chrome/browser/ssl/ssl_policy.cc +++ b/chrome/browser/ssl/ssl_policy.cc @@ -258,7 +258,7 @@ class DefaultPolicy : public SSLPolicy { if (error->manager()->SetMaxSecurityStyle( SECURITY_STYLE_AUTHENTICATION_BROKEN)) { NotificationService::current()->Notify( - NOTIFY_SSL_STATE_CHANGED, + NotificationType::SSL_STATE_CHANGED, Source<NavigationController>(error->manager()->controller()), Details<NavigationEntry>( error->manager()->controller()->GetActiveEntry())); @@ -313,7 +313,7 @@ class DefaultPolicy : public SSLPolicy { AddMessageToConsole(msg, MESSAGE_LEVEL_WARNING); NotificationService::current()->Notify( - NOTIFY_SSL_STATE_CHANGED, + NotificationType::SSL_STATE_CHANGED, Source<NavigationController>(navigation_controller), Details<NavigationEntry>(entry)); } @@ -410,7 +410,7 @@ void SSLPolicy::OnRequestStarted(SSLManager* manager, const GURL& url, if (changed) { // Only send the notification when something actually changed. NotificationService::current()->Notify( - NOTIFY_SSL_STATE_CHANGED, + NotificationType::SSL_STATE_CHANGED, Source<NavigationController>(manager->controller()), NotificationService::NoDetails()); } |