summaryrefslogtreecommitdiffstats
path: root/net/url_request/url_request.cc
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-03 18:23:57 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-03 18:23:57 +0000
commitbb445ce3e4cf005b673c1a062575ee18dbddfdc9 (patch)
tree6c7f5d96968d0dd027fe5786342d667787aeaf18 /net/url_request/url_request.cc
parent627d9344c2733f6160927dac527e67a6c79d9304 (diff)
downloadchromium_src-bb445ce3e4cf005b673c1a062575ee18dbddfdc9.zip
chromium_src-bb445ce3e4cf005b673c1a062575ee18dbddfdc9.tar.gz
chromium_src-bb445ce3e4cf005b673c1a062575ee18dbddfdc9.tar.bz2
Tweaks to extension webRequest API.
- onBeforeSendHeaders respects extraInfoSpec. - request headers are now an array of {name, value} objects instead of a flat string. - onBeforeRequest is sent after redirects now. This allows extensions to intercept redirects and cancel/redirect them elsewhere. BUG=60101 TEST=no Review URL: http://codereview.chromium.org/6912008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83925 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request.cc')
-rw-r--r--net/url_request/url_request.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 0f19d69..d1d46bfb 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -371,7 +371,7 @@ void URLRequest::Start() {
}
}
- StartInternal();
+ StartJob(URLRequestJobManager::GetInstance()->CreateJob(this));
}
///////////////////////////////////////////////////////////////////////////////
@@ -388,14 +388,10 @@ void URLRequest::BeforeRequestComplete(int error) {
new_url.Swap(&delegate_redirect_url_);
StartJob(new URLRequestRedirectJob(this, new_url));
} else {
- StartInternal();
+ StartJob(URLRequestJobManager::GetInstance()->CreateJob(this));
}
}
-void URLRequest::StartInternal() {
- StartJob(URLRequestJobManager::GetInstance()->CreateJob(this));
-}
-
void URLRequest::StartJob(URLRequestJob* job) {
DCHECK(!is_pending_);
DCHECK(!job_);
@@ -638,7 +634,7 @@ int URLRequest::Redirect(const GURL& location, int http_status_code) {
final_upload_progress_ = job_->GetUploadProgress();
PrepareToRestart();
- StartInternal();
+ Start();
return OK;
}