diff options
Diffstat (limited to 'chrome/browser/ssl/ssl_manager.cc')
-rw-r--r-- | chrome/browser/ssl/ssl_manager.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/chrome/browser/ssl/ssl_manager.cc b/chrome/browser/ssl/ssl_manager.cc index f874cc0..7c9cd8f 100644 --- a/chrome/browser/ssl/ssl_manager.cc +++ b/chrome/browser/ssl/ssl_manager.cc @@ -11,12 +11,15 @@ #include "chrome/browser/net/url_request_tracking.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/renderer_host/resource_request_details.h" +#include "chrome/browser/renderer_host/resource_dispatcher_host.h" +#include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" #include "chrome/browser/ssl/ssl_cert_error_handler.h" #include "chrome/browser/ssl/ssl_policy.h" #include "chrome/browser/ssl/ssl_request_info.h" #include "chrome/browser/tab_contents/navigation_controller.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/provisional_load_details.h" +#include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" #include "grit/generated_resources.h" @@ -95,17 +98,18 @@ bool SSLManager::DeserializeSecurityInfo(const std::string& state, } // static -std::wstring SSLManager::GetEVCertName(const net::X509Certificate& cert) { +string16 SSLManager::GetEVCertName(const net::X509Certificate& cert) { // EV are required to have an organization name and country. if (cert.subject().organization_names.empty() || cert.subject().country_name.empty()) { NOTREACHED(); - return std::wstring(); + return string16(); } - return l10n_util::GetStringF(IDS_SECURE_CONNECTION_EV, - UTF8ToWide(cert.subject().organization_names[0]), - UTF8ToWide(cert.subject().country_name)); + return l10n_util::GetStringFUTF16( + IDS_SECURE_CONNECTION_EV, + UTF8ToUTF16(cert.subject().organization_names[0]), + UTF8ToUTF16(cert.subject().country_name)); } SSLManager::SSLManager(NavigationController* controller) @@ -118,9 +122,9 @@ SSLManager::SSLManager(NavigationController* controller) registrar_.Add(this, NotificationType::FAIL_PROVISIONAL_LOAD_WITH_ERROR, Source<NavigationController>(controller_)); registrar_.Add(this, NotificationType::RESOURCE_RESPONSE_STARTED, - Source<NavigationController>(controller_)); + Source<RenderViewHostDelegate>(controller_->tab_contents())); registrar_.Add(this, NotificationType::RESOURCE_RECEIVED_REDIRECT, - Source<NavigationController>(controller_)); + Source<RenderViewHostDelegate>(controller_->tab_contents())); registrar_.Add(this, NotificationType::LOAD_FROM_MEMORY_CACHE, Source<NavigationController>(controller_)); registrar_.Add(this, NotificationType::SSL_INTERNAL_STATE_CHANGED, @@ -204,8 +208,6 @@ void SSLManager::Observe(NotificationType type, } void SSLManager::DidLoadFromMemoryCache(LoadFromMemoryCacheDetails* details) { - DCHECK(details); - // Simulate loading this resource through the usual path. // Note that we specify SUB_RESOURCE as the resource type as WebCore only // caches sub-resources. @@ -225,8 +227,6 @@ void SSLManager::DidLoadFromMemoryCache(LoadFromMemoryCacheDetails* details) { } void SSLManager::DidStartResourceResponse(ResourceRequestDetails* details) { - DCHECK(details); - scoped_refptr<SSLRequestInfo> info(new SSLRequestInfo( details->url(), details->resource_type(), |