summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authornsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-07 16:13:11 +0000
committernsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-07 16:13:11 +0000
commit7c825a47e993f941e13d505727e0d3bc6699d193 (patch)
tree5892e892aed7ad3b4d85fcc1affe43ee0f38ef5f /chrome/browser
parent44986391568796028c6ecf84f4112facdaee7e22 (diff)
downloadchromium_src-7c825a47e993f941e13d505727e0d3bc6699d193.zip
chromium_src-7c825a47e993f941e13d505727e0d3bc6699d193.tar.gz
chromium_src-7c825a47e993f941e13d505727e0d3bc6699d193.tar.bz2
Revert change 11197 because it created 138 new layout tests
failures. Review URL: http://codereview.chromium.org/39311 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11201 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/renderer_host/async_resource_handler.cc10
-rw-r--r--chrome/browser/renderer_host/async_resource_handler.h6
-rw-r--r--chrome/browser/renderer_host/buffered_resource_handler.cc11
-rw-r--r--chrome/browser/renderer_host/buffered_resource_handler.h4
-rw-r--r--chrome/browser/renderer_host/cross_site_resource_handler.cc15
-rw-r--r--chrome/browser/renderer_host/cross_site_resource_handler.h5
-rw-r--r--chrome/browser/renderer_host/download_resource_handler.cc3
-rw-r--r--chrome/browser/renderer_host/download_resource_handler.h4
-rw-r--r--chrome/browser/renderer_host/download_throttling_resource_handler.cc6
-rw-r--r--chrome/browser/renderer_host/download_throttling_resource_handler.h3
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.cc22
-rw-r--r--chrome/browser/renderer_host/resource_handler.h5
-rw-r--r--chrome/browser/renderer_host/safe_browsing_resource_handler.cc14
-rw-r--r--chrome/browser/renderer_host/safe_browsing_resource_handler.h7
-rw-r--r--chrome/browser/renderer_host/save_file_resource_handler.cc3
-rw-r--r--chrome/browser/renderer_host/save_file_resource_handler.h4
-rw-r--r--chrome/browser/renderer_host/sync_resource_handler.cc6
-rw-r--r--chrome/browser/renderer_host/sync_resource_handler.h6
-rw-r--r--chrome/browser/ssl/ssl_manager.cc9
-rw-r--r--chrome/browser/ssl/ssl_manager.h13
20 files changed, 39 insertions, 117 deletions
diff --git a/chrome/browser/renderer_host/async_resource_handler.cc b/chrome/browser/renderer_host/async_resource_handler.cc
index 650c7c3..881d686 100644
--- a/chrome/browser/renderer_host/async_resource_handler.cc
+++ b/chrome/browser/renderer_host/async_resource_handler.cc
@@ -116,14 +116,10 @@ bool AsyncResourceHandler::OnReadCompleted(int request_id, int* bytes_read) {
return true;
}
-bool AsyncResourceHandler::OnResponseCompleted(
- int request_id,
- const URLRequestStatus& status,
- const std::string& security_info) {
+bool AsyncResourceHandler::OnResponseCompleted(int request_id,
+ const URLRequestStatus& status) {
receiver_->Send(new ViewMsg_Resource_RequestComplete(routing_id_,
- request_id,
- status,
- security_info));
+ request_id, status));
// If we still have a read buffer, then see about caching it for later...
if (spare_read_buffer_) {
diff --git a/chrome/browser/renderer_host/async_resource_handler.h b/chrome/browser/renderer_host/async_resource_handler.h
index 7407e6d..e966a80 100644
--- a/chrome/browser/renderer_host/async_resource_handler.h
+++ b/chrome/browser/renderer_host/async_resource_handler.h
@@ -5,8 +5,6 @@
#ifndef CHROME_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_
#define CHROME_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_
-#include <string>
-
#include "base/process.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/browser/renderer_host/resource_handler.h"
@@ -31,9 +29,7 @@ class AsyncResourceHandler : public ResourceHandler {
bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size,
int min_size);
bool OnReadCompleted(int request_id, int* bytes_read);
- bool OnResponseCompleted(int request_id,
- const URLRequestStatus& status,
- const std::string& security_info);
+ bool OnResponseCompleted(int request_id, const URLRequestStatus& status);
static void GlobalCleanup();
diff --git a/chrome/browser/renderer_host/buffered_resource_handler.cc b/chrome/browser/renderer_host/buffered_resource_handler.cc
index c49666c7..e1144c2 100644
--- a/chrome/browser/renderer_host/buffered_resource_handler.cc
+++ b/chrome/browser/renderer_host/buffered_resource_handler.cc
@@ -72,10 +72,8 @@ bool BufferedResourceHandler::OnResponseStarted(int request_id,
bool BufferedResourceHandler::OnResponseCompleted(
- int request_id,
- const URLRequestStatus& status,
- const std::string& security_info) {
- return real_handler_->OnResponseCompleted(request_id, status, security_info);
+ int request_id, const URLRequestStatus& status) {
+ return real_handler_->OnResponseCompleted(request_id, status);
}
// We'll let the original event handler provide a buffer, and reuse it for
@@ -244,7 +242,7 @@ bool BufferedResourceHandler::CompleteResponseStarted(int request_id,
// own error page instead of triggering a download.
// TODO(abarth): We should abstract the response_code test, but this kind
// of check is scattered throughout our codebase.
- request_->SimulateError(net::ERR_FILE_NOT_FOUND);
+ request_->CancelWithError(net::ERR_FILE_NOT_FOUND);
return false;
}
@@ -272,8 +270,7 @@ bool BufferedResourceHandler::CompleteResponseStarted(int request_id,
// handled by an external source (the browser's DownloadManager).
real_handler_->OnResponseStarted(info->request_id, response_);
URLRequestStatus status(URLRequestStatus::HANDLED_EXTERNALLY, 0);
- real_handler_->OnResponseCompleted(info->request_id, status,
- std::string());
+ real_handler_->OnResponseCompleted(info->request_id, status);
// Ditch the old async handler that talks to the renderer for the new
// download handler that talks to the DownloadManager.
diff --git a/chrome/browser/renderer_host/buffered_resource_handler.h b/chrome/browser/renderer_host/buffered_resource_handler.h
index e553aca..97907b5 100644
--- a/chrome/browser/renderer_host/buffered_resource_handler.h
+++ b/chrome/browser/renderer_host/buffered_resource_handler.h
@@ -26,9 +26,7 @@ class BufferedResourceHandler : public ResourceHandler {
bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size,
int min_size);
bool OnReadCompleted(int request_id, int* bytes_read);
- bool OnResponseCompleted(int request_id,
- const URLRequestStatus& status,
- const std::string& security_info);
+ bool OnResponseCompleted(int request_id, const URLRequestStatus& status);
private:
// Returns true if we should delay OnResponseStarted forwarding.
diff --git a/chrome/browser/renderer_host/cross_site_resource_handler.cc b/chrome/browser/renderer_host/cross_site_resource_handler.cc
index 1e25f17..363d451 100644
--- a/chrome/browser/renderer_host/cross_site_resource_handler.cc
+++ b/chrome/browser/renderer_host/cross_site_resource_handler.cc
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <string>
-
#include "chrome/browser/renderer_host/cross_site_resource_handler.h"
#include "chrome/browser/renderer_host/render_view_host.h"
@@ -131,13 +129,11 @@ bool CrossSiteResourceHandler::OnReadCompleted(int request_id,
bool CrossSiteResourceHandler::OnResponseCompleted(
int request_id,
- const URLRequestStatus& status,
- const std::string& security_info) {
+ const URLRequestStatus& status) {
if (!in_cross_site_transition_) {
if (has_started_response_) {
// We've already completed the transition, so just pass it through.
- return next_handler_->OnResponseCompleted(request_id, status,
- security_info);
+ return next_handler_->OnResponseCompleted(request_id, status);
} else {
// Some types of failures will call OnResponseCompleted without calling
// CrossSiteResourceHandler::OnResponseStarted.
@@ -149,8 +145,7 @@ bool CrossSiteResourceHandler::OnResponseCompleted(
new CancelPendingRenderViewTask(render_process_host_id_,
render_view_id_);
rdh_->ui_loop()->PostTask(FROM_HERE, task);
- return next_handler_->OnResponseCompleted(request_id, status,
- security_info);
+ return next_handler_->OnResponseCompleted(request_id, status);
} else {
// An error occured, we should wait now for the cross-site transition,
// so that the error message (e.g., 404) can be displayed to the user.
@@ -166,7 +161,6 @@ bool CrossSiteResourceHandler::OnResponseCompleted(
// We have to buffer the call until after the transition completes.
completed_during_transition_ = true;
completed_status_ = status;
- completed_security_info_ = security_info;
// Return false to tell RDH not to notify the world or clean up the
// pending request. We will do so in ResumeResponse.
@@ -207,8 +201,7 @@ void CrossSiteResourceHandler::ResumeResponse() {
// If the response completed during the transition, notify the next
// event handler.
if (completed_during_transition_) {
- next_handler_->OnResponseCompleted(request_id_, completed_status_,
- completed_security_info_);
+ next_handler_->OnResponseCompleted(request_id_, completed_status_);
// Since we didn't notify the world or clean up the pending request in
// RDH::OnResponseCompleted during the transition, we should do it now.
diff --git a/chrome/browser/renderer_host/cross_site_resource_handler.h b/chrome/browser/renderer_host/cross_site_resource_handler.h
index 2ae2c75..7d57c76 100644
--- a/chrome/browser/renderer_host/cross_site_resource_handler.h
+++ b/chrome/browser/renderer_host/cross_site_resource_handler.h
@@ -27,9 +27,7 @@ class CrossSiteResourceHandler : public ResourceHandler {
bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size,
int min_size);
bool OnReadCompleted(int request_id, int* bytes_read);
- bool OnResponseCompleted(int request_id,
- const URLRequestStatus& status,
- const std::string& security_info);
+ bool OnResponseCompleted(int request_id, const URLRequestStatus& status);
// We can now send the response to the new renderer, which will cause
// WebContents to swap in the new renderer and destroy the old one.
@@ -51,7 +49,6 @@ class CrossSiteResourceHandler : public ResourceHandler {
int request_id_;
bool completed_during_transition_;
URLRequestStatus completed_status_;
- std::string completed_security_info_;
ResourceResponse* response_;
ResourceDispatcherHost* rdh_;
diff --git a/chrome/browser/renderer_host/download_resource_handler.cc b/chrome/browser/renderer_host/download_resource_handler.cc
index 2187506..37e7e89 100644
--- a/chrome/browser/renderer_host/download_resource_handler.cc
+++ b/chrome/browser/renderer_host/download_resource_handler.cc
@@ -113,8 +113,7 @@ bool DownloadResourceHandler::OnReadCompleted(int request_id, int* bytes_read) {
bool DownloadResourceHandler::OnResponseCompleted(
int request_id,
- const URLRequestStatus& status,
- const std::string& security_info) {
+ const URLRequestStatus& status) {
download_manager_->file_loop()->PostTask(FROM_HERE,
NewRunnableMethod(download_manager_,
&DownloadFileManager::DownloadFinished,
diff --git a/chrome/browser/renderer_host/download_resource_handler.h b/chrome/browser/renderer_host/download_resource_handler.h
index d9afa42..dfc047e 100644
--- a/chrome/browser/renderer_host/download_resource_handler.h
+++ b/chrome/browser/renderer_host/download_resource_handler.h
@@ -37,9 +37,7 @@ class DownloadResourceHandler : public ResourceHandler {
bool OnReadCompleted(int request_id, int* bytes_read);
- bool OnResponseCompleted(int request_id,
- const URLRequestStatus& status,
- const std::string& security_info);
+ bool OnResponseCompleted(int request_id, const URLRequestStatus& status);
// If the content-length header is not present (or contains something other
// than numbers), the incoming content_length is -1 (unknown size).
diff --git a/chrome/browser/renderer_host/download_throttling_resource_handler.cc b/chrome/browser/renderer_host/download_throttling_resource_handler.cc
index 2e8042b..f049788 100644
--- a/chrome/browser/renderer_host/download_throttling_resource_handler.cc
+++ b/chrome/browser/renderer_host/download_throttling_resource_handler.cc
@@ -99,11 +99,9 @@ bool DownloadThrottlingResourceHandler::OnReadCompleted(int request_id,
bool DownloadThrottlingResourceHandler::OnResponseCompleted(
int request_id,
- const URLRequestStatus& status,
- const std::string& security_info) {
+ const URLRequestStatus& status) {
if (download_handler_.get())
- return download_handler_->OnResponseCompleted(request_id, status,
- security_info);
+ return download_handler_->OnResponseCompleted(request_id, status);
NOTREACHED();
return true;
}
diff --git a/chrome/browser/renderer_host/download_throttling_resource_handler.h b/chrome/browser/renderer_host/download_throttling_resource_handler.h
index 5a2eea9..3306475 100644
--- a/chrome/browser/renderer_host/download_throttling_resource_handler.h
+++ b/chrome/browser/renderer_host/download_throttling_resource_handler.h
@@ -46,8 +46,7 @@ class DownloadThrottlingResourceHandler
int min_size);
virtual bool OnReadCompleted(int request_id, int* bytes_read);
virtual bool OnResponseCompleted(int request_id,
- const URLRequestStatus& status,
- const std::string& security_info);
+ const URLRequestStatus& status);
// DownloadRequestManager::Callback implementation:
void CancelDownload();
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc
index 750fa33..ba161e4 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc
@@ -205,8 +205,7 @@ bool ResourceDispatcherHost::HandleExternalProtocol(int request_id,
handler->OnResponseCompleted(request_id, URLRequestStatus(
URLRequestStatus::FAILED,
- net::ERR_ABORTED),
- std::string()); // No security info necessary.
+ net::ERR_ABORTED));
return true;
}
@@ -225,9 +224,7 @@ void ResourceDispatcherHost::BeginRequest(
receiver->Send(new ViewMsg_Resource_RequestComplete(
render_view_id,
request_id,
- URLRequestStatus(URLRequestStatus::FAILED, net::ERR_ABORTED),
- std::string())); // No security info needed, connection was not
- // established.
+ URLRequestStatus(URLRequestStatus::FAILED, net::ERR_ABORTED)));
return;
}
@@ -922,7 +919,7 @@ void ResourceDispatcherHost::BeginRequestInternal(URLRequest* request,
if (memory_cost > max_outstanding_requests_cost_per_process_) {
// We call "CancelWithError()" as a way of setting the URLRequest's
// status -- it has no effect beyond this, since the request hasn't started.
- request->SimulateError(net::ERR_INSUFFICIENT_RESOURCES);
+ request->CancelWithError(net::ERR_INSUFFICIENT_RESOURCES);
// TODO(eroman): this is kinda funky -- we insert the unstarted request into
// |pending_requests_| simply to please OnResponseCompleted().
@@ -1124,19 +1121,8 @@ void ResourceDispatcherHost::OnResponseCompleted(URLRequest* request) {
RESOURCE_LOG("OnResponseCompleted: " << request->url().spec());
ExtraRequestInfo* info = ExtraInfoForRequest(request);
- std::string security_info;
- const net::SSLInfo& ssl_info = request->ssl_info();
- if (ssl_info.cert != NULL) {
- int cert_id = CertStore::GetSharedInstance()->
- StoreCert(ssl_info.cert, info->render_process_host_id);
- security_info = SSLManager::SerializeSecurityInfo(cert_id,
- ssl_info.cert_status,
- ssl_info.security_bits);
- }
-
if (info->resource_handler->OnResponseCompleted(info->request_id,
- request->status(),
- security_info)) {
+ request->status())) {
NotifyResponseCompleted(request, info->render_process_host_id);
// The request is complete so we can remove it.
diff --git a/chrome/browser/renderer_host/resource_handler.h b/chrome/browser/renderer_host/resource_handler.h
index 2b843f9..01abcb5 100644
--- a/chrome/browser/renderer_host/resource_handler.h
+++ b/chrome/browser/renderer_host/resource_handler.h
@@ -12,8 +12,6 @@
#ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_
#define CHROME_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_
-#include <string>
-
#include "chrome/common/filter_policy.h"
#include "net/url_request/url_request_status.h"
#include "webkit/glue/resource_loader_bridge.h"
@@ -85,8 +83,7 @@ class ResourceHandler : public base::RefCounted<ResourceHandler> {
// The response is complete. The final response status is given.
// Returns false if the handler is deferring the call to a later time.
virtual bool OnResponseCompleted(int request_id,
- const URLRequestStatus& status,
- const std::string& security_info) = 0;
+ const URLRequestStatus& status) = 0;
};
#endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_
diff --git a/chrome/browser/renderer_host/safe_browsing_resource_handler.cc b/chrome/browser/renderer_host/safe_browsing_resource_handler.cc
index 0d0d058..7ee4661 100644
--- a/chrome/browser/renderer_host/safe_browsing_resource_handler.cc
+++ b/chrome/browser/renderer_host/safe_browsing_resource_handler.cc
@@ -101,8 +101,7 @@ bool SafeBrowsingResourceHandler::OnReadCompleted(int request_id,
}
bool SafeBrowsingResourceHandler::OnResponseCompleted(
- int request_id, const URLRequestStatus& status,
- const std::string& security_info) {
+ int request_id, const URLRequestStatus& status) {
if ((in_safe_browsing_check_ ||
safe_browsing_result_ != SafeBrowsingService::URL_SAFE) &&
status.status() == URLRequestStatus::FAILED &&
@@ -112,11 +111,10 @@ bool SafeBrowsingResourceHandler::OnResponseCompleted(
// page.
queued_error_.reset(new URLRequestStatus(status));
queued_error_request_id_ = request_id;
- queued_security_info_ = security_info;
return true;
}
- return next_handler_->OnResponseCompleted(request_id, status, security_info);
+ return next_handler_->OnResponseCompleted(request_id, status);
}
// SafeBrowsingService::Client implementation, called on the IO thread once
@@ -142,10 +140,8 @@ void SafeBrowsingResourceHandler::OnUrlCheckResult(
if (queued_error_.get()) {
next_handler_->OnResponseCompleted(
- queued_error_request_id_, *queued_error_.get(),
- queued_security_info_);
+ queued_error_request_id_, *queued_error_.get());
queued_error_.reset();
- queued_security_info_.clear();
}
Release();
@@ -172,10 +168,8 @@ void SafeBrowsingResourceHandler::OnBlockingPageComplete(bool proceed) {
if (queued_error_.get()) {
next_handler_->OnResponseCompleted(
- queued_error_request_id_, *queued_error_.get(),
- queued_security_info_);
+ queued_error_request_id_, *queued_error_.get());
queued_error_.reset();
- queued_security_info_.clear();
}
} else {
rdh_->CancelRequest(render_process_host_id_, paused_request_id_, false);
diff --git a/chrome/browser/renderer_host/safe_browsing_resource_handler.h b/chrome/browser/renderer_host/safe_browsing_resource_handler.h
index a3c74ba..92e0040 100644
--- a/chrome/browser/renderer_host/safe_browsing_resource_handler.h
+++ b/chrome/browser/renderer_host/safe_browsing_resource_handler.h
@@ -5,8 +5,6 @@
#ifndef CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_HANDLER_H_
#define CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_HANDLER_H_
-#include <string>
-
#include "base/time.h"
#include "chrome/browser/renderer_host/resource_handler.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
@@ -33,9 +31,7 @@ class SafeBrowsingResourceHandler : public ResourceHandler,
bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size,
int min_size);
bool OnReadCompleted(int request_id, int* bytes_read);
- bool OnResponseCompleted(int request_id,
- const URLRequestStatus& status,
- const std::string& security_info);
+ bool OnResponseCompleted(int request_id, const URLRequestStatus& status);
// SafeBrowsingService::Client implementation, called on the IO thread once
// the URL has been classified.
@@ -56,7 +52,6 @@ class SafeBrowsingResourceHandler : public ResourceHandler,
SafeBrowsingService::UrlCheckResult safe_browsing_result_;
scoped_refptr<SafeBrowsingService> safe_browsing_;
scoped_ptr<URLRequestStatus> queued_error_;
- std::string queued_security_info_;
int queued_error_request_id_;
ResourceDispatcherHost* rdh_;
base::Time pause_time_;
diff --git a/chrome/browser/renderer_host/save_file_resource_handler.cc b/chrome/browser/renderer_host/save_file_resource_handler.cc
index 2f469f1..c4db4a2 100644
--- a/chrome/browser/renderer_host/save_file_resource_handler.cc
+++ b/chrome/browser/renderer_host/save_file_resource_handler.cc
@@ -74,8 +74,7 @@ bool SaveFileResourceHandler::OnReadCompleted(int request_id, int* bytes_read) {
bool SaveFileResourceHandler::OnResponseCompleted(
int request_id,
- const URLRequestStatus& status,
- const std::string& security_info) {
+ const URLRequestStatus& status) {
save_manager_->GetSaveLoop()->PostTask(FROM_HERE,
NewRunnableMethod(save_manager_,
&SaveFileManager::SaveFinished,
diff --git a/chrome/browser/renderer_host/save_file_resource_handler.h b/chrome/browser/renderer_host/save_file_resource_handler.h
index bc3548c..03f4a02 100644
--- a/chrome/browser/renderer_host/save_file_resource_handler.h
+++ b/chrome/browser/renderer_host/save_file_resource_handler.h
@@ -34,9 +34,7 @@ class SaveFileResourceHandler : public ResourceHandler {
// Passes the buffer to the download file writer.
bool OnReadCompleted(int request_id, int* bytes_read);
- bool OnResponseCompleted(int request_id,
- const URLRequestStatus& status,
- const std::string& security_info);
+ bool OnResponseCompleted(int request_id, const URLRequestStatus& status);
// If the content-length header is not present (or contains something other
// than numbers), StringToInt64 returns 0, which indicates 'unknown size' and
diff --git a/chrome/browser/renderer_host/sync_resource_handler.cc b/chrome/browser/renderer_host/sync_resource_handler.cc
index 5be45a9..cc74b2d 100644
--- a/chrome/browser/renderer_host/sync_resource_handler.cc
+++ b/chrome/browser/renderer_host/sync_resource_handler.cc
@@ -54,10 +54,8 @@ bool SyncResourceHandler::OnReadCompleted(int request_id, int* bytes_read) {
return true;
}
-bool SyncResourceHandler::OnResponseCompleted(
- int request_id,
- const URLRequestStatus& status,
- const std::string& security_info) {
+bool SyncResourceHandler::OnResponseCompleted(int request_id,
+ const URLRequestStatus& status) {
result_.status = status;
ViewHostMsg_SyncLoad::WriteReplyParams(result_message_, result_);
diff --git a/chrome/browser/renderer_host/sync_resource_handler.h b/chrome/browser/renderer_host/sync_resource_handler.h
index 8aa4681..deb7746 100644
--- a/chrome/browser/renderer_host/sync_resource_handler.h
+++ b/chrome/browser/renderer_host/sync_resource_handler.h
@@ -5,8 +5,6 @@
#ifndef CHROME_BROWSER_RENDERER_HOST_SYNC_RESOURCE_HANDLER_H_
#define CHROME_BROWSER_RENDERER_HOST_SYNC_RESOURCE_HANDLER_H_
-#include <string>
-
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/browser/renderer_host/resource_handler.h"
#include "net/base/io_buffer.h"
@@ -25,9 +23,7 @@ class SyncResourceHandler : public ResourceHandler {
bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size,
int min_size);
bool OnReadCompleted(int request_id, int* bytes_read);
- bool OnResponseCompleted(int request_id,
- const URLRequestStatus& status,
- const std::string& security_info);
+ bool OnResponseCompleted(int request_id, const URLRequestStatus& status);
private:
enum { kReadBufSize = 3840 };
diff --git a/chrome/browser/ssl/ssl_manager.cc b/chrome/browser/ssl/ssl_manager.cc
index 58d7acb..bc95a53 100644
--- a/chrome/browser/ssl/ssl_manager.cc
+++ b/chrome/browser/ssl/ssl_manager.cc
@@ -338,11 +338,7 @@ void SSLManager::ErrorHandler::CompleteCancelRequest(int error) {
// The request can be NULL if it was cancelled by the renderer (as the
// result of the user navigating to a new page from the location bar).
DLOG(INFO) << "CompleteCancelRequest() url: " << request->url().spec();
- SSLManager::CertError* cert_error = AsCertError();
- if (cert_error)
- request->SimulateSSLError(error, cert_error->ssl_info());
- else
- request->SimulateError(error);
+ request->CancelWithError(error);
}
request_has_been_notified_ = true;
@@ -595,8 +591,7 @@ void SSLManager::DidCommitProvisionalLoad(
// An HTTPS response may not have a certificate for some reason. When that
// happens, use the unauthenticated (HTTP) rather than the authentication
// broken security style so that we can detect this error condition.
- if (net::IsCertStatusError(ssl_cert_status) &&
- !details->is_content_filtered) {
+ if (net::IsCertStatusError(ssl_cert_status)) {
changed |= SetMaxSecurityStyle(SECURITY_STYLE_AUTHENTICATION_BROKEN);
if (!details->is_main_frame &&
!details->entry->ssl().has_unsafe_content()) {
diff --git a/chrome/browser/ssl/ssl_manager.h b/chrome/browser/ssl/ssl_manager.h
index 63cfce4..0b1842e 100644
--- a/chrome/browser/ssl/ssl_manager.h
+++ b/chrome/browser/ssl/ssl_manager.h
@@ -49,8 +49,6 @@ class WebContents;
class SSLManager : public NotificationObserver {
public:
- class CertError;
-
// An ErrorHandler carries information from the IO thread to the UI thread
// and is dispatched to the appropriate SSLManager when it arrives on the
// UI thread. Subclasses should override the OnDispatched/OnDispatchFailed
@@ -65,8 +63,6 @@ class SSLManager : public NotificationObserver {
public:
virtual ~ErrorHandler() { }
- virtual CertError* AsCertError() { return NULL; }
-
// Find the appropriate SSLManager for the URLRequest and begin handling
// this error.
//
@@ -171,7 +167,7 @@ class SSLManager : public NotificationObserver {
bool request_has_been_notified_; // A flag to make sure we notify the
// URLRequest exactly once.
- DISALLOW_COPY_AND_ASSIGN(ErrorHandler);
+ DISALLOW_EVIL_CONSTRUCTORS(ErrorHandler);
};
// A CertError represents an error that occurred with the certificate in an
@@ -179,9 +175,6 @@ class SSLManager : public NotificationObserver {
// thread and allows us to cancel/continue a request it is associated with.
class CertError : public ErrorHandler {
public:
-
- virtual CertError* AsCertError() { return this; }
-
// These accessors are available on either thread
const net::SSLInfo& ssl_info() const { return ssl_info_; }
int cert_error() const { return cert_error_; }
@@ -213,7 +206,7 @@ class SSLManager : public NotificationObserver {
// that error.
ResourceType::Type resource_type_;
- DISALLOW_COPY_AND_ASSIGN(CertError);
+ DISALLOW_EVIL_CONSTRUCTORS(CertError);
};
// The MixedContentHandler class is used to query what to do with
@@ -231,7 +224,7 @@ class SSLManager : public NotificationObserver {
virtual void OnDispatched() { manager()->OnMixedContent(this); }
private:
- DISALLOW_COPY_AND_ASSIGN(MixedContentHandler);
+ DISALLOW_EVIL_CONSTRUCTORS(MixedContentHandler);
};
// The SSLManager will ask its delegate to decide how to handle events