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

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

Issue 6334131: Turn off safebrowsing for PREFETCH requests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: improve browser test Created 9 years, 9 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
Index: content/browser/renderer_host/resource_dispatcher_host.cc
diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc
index ce7548176b975c5f49067d7ca024a882a4f1ae13..70c05755cd0ac6b186652444d716fc59b7d47ade 100644
--- a/content/browser/renderer_host/resource_dispatcher_host.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host.cc
@@ -1187,7 +1187,13 @@ void ResourceDispatcherHost::CancelRequest(int child_id,
DLOG(WARNING) << "Canceling a request that wasn't found";
return;
}
- CancelRequestInternal(i->second, from_renderer);
+ net::URLRequest* request = i->second;
+ const bool started_before_cancel = request->is_pending();
+ CancelRequestInternal(request, from_renderer);
+ // If the request isn't in flight, then we won't get asyncronous notification,
+ // so we have to signal ourselves to finish this request.
+ if (!started_before_cancel)
+ OnResponseCompleted(request);
}
void ResourceDispatcherHost::CancelRequestInternal(net::URLRequest* request,

Powered by Google App Engine
This is Rietveld 408576698