summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/resource_dispatcher_host.h
diff options
context:
space:
mode:
authortonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-13 02:55:08 +0000
committertonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-13 02:55:08 +0000
commitf5b05bfa0f15fc461049863e2e881cd24256174e (patch)
tree1edd78049d34d10a4a7a60fd0824193d8c007586 /chrome/browser/renderer_host/resource_dispatcher_host.h
parent638f0da67d241aac5d100f0344f8a25e0476cf1e (diff)
downloadchromium_src-f5b05bfa0f15fc461049863e2e881cd24256174e.zip
chromium_src-f5b05bfa0f15fc461049863e2e881cd24256174e.tar.gz
chromium_src-f5b05bfa0f15fc461049863e2e881cd24256174e.tar.bz2
Factoring out a CancelRequestInternal() method which
avoids unnecessarily performing a second map lookup in many cases. BUG=none TEST=none Review URL: http://codereview.chromium.org/1631012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44317 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/resource_dispatcher_host.h')
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.h b/chrome/browser/renderer_host/resource_dispatcher_host.h
index c09fae6..79bf277 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.h
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.h
@@ -321,6 +321,9 @@ class ResourceDispatcherHost : public URLRequest::Delegate {
// Helper function for regular and download requests.
void BeginRequestInternal(URLRequest* request);
+ // Helper function that cancels |request|.
+ void CancelRequestInternal(URLRequest* request, bool from_renderer);
+
// Helper function that inserts |request| into the resource queue.
void InsertIntoResourceQueue(
URLRequest* request,
@@ -399,6 +402,9 @@ class ResourceDispatcherHost : public URLRequest::Delegate {
bool has_new_first_party_for_cookies,
const GURL& new_first_party_for_cookies);
+ // Returns true if |request| is in |pending_requests_|.
+ bool IsValidRequest(URLRequest* request);
+
// Returns true if the message passed in is a resource related message.
static bool IsResourceDispatcherHostMessage(const IPC::Message&);