Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Unified Diff: content/browser/renderer_host/buffered_resource_handler.cc

Issue 10451023: Avoid double calling OnResponseStarted from BufferedResourceHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to LKGR. Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/download/download_resource_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/buffered_resource_handler.cc
diff --git a/content/browser/renderer_host/buffered_resource_handler.cc b/content/browser/renderer_host/buffered_resource_handler.cc
index b0de440f1be276bc8369fa386f3c2ca052be6ebd..2d700bcf499be722852fa3ff058941767457a309 100644
--- a/content/browser/renderer_host/buffered_resource_handler.cc
+++ b/content/browser/renderer_host/buffered_resource_handler.cc
@@ -281,9 +281,11 @@ bool BufferedResourceHandler::CompleteResponseStarted(int request_id,
new X509UserCertResourceHandler(request_,
info->GetChildID(),
info->GetRouteID());
- if (!UseAlternateResourceHandler(request_id, x509_cert_handler, defer))
- return false;
- } else if (info->allow_download() && ShouldDownload(NULL)) {
+
+ return UseAlternateResourceHandler(request_id, x509_cert_handler, defer);
+ }
+
+ if (info->allow_download() && ShouldDownload(NULL)) {
// Forward the data to the download thread.
if (response_->headers && // Can be NULL if FTP.
@@ -310,8 +312,7 @@ bool BufferedResourceHandler::CompleteResponseStarted(int request_id,
DownloadSaveInfo(),
DownloadResourceHandler::OnStartedCallback()));
- if (!UseAlternateResourceHandler(request_id, handler, defer))
- return false;
+ return UseAlternateResourceHandler(request_id, handler, defer);
}
if (*defer)
« no previous file with comments | « content/browser/download/download_resource_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698