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

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: clean up unit test, per pending fix to 75507 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
« no previous file with comments | « chrome/test/data/safe_browsing/prefetch_malware.html ('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/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 6d9e9d8d6a058360ae8cd352735747cda8fc88e6..99730b7f4b4d1f844411d9119f891d51e4817623 100644
--- a/content/browser/renderer_host/resource_dispatcher_host.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host.cc
@@ -1185,7 +1185,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,
« no previous file with comments | « chrome/test/data/safe_browsing/prefetch_malware.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698