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

Unified Diff: net/url_request/url_request_http_job.h

Issue 154473002: Support redirectUrl at onHeadersReceived in WebRequest / DWR API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 6 years, 10 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: net/url_request/url_request_http_job.h
diff --git a/net/url_request/url_request_http_job.h b/net/url_request/url_request_http_job.h
index 33014e50c613c393ece346d9a16c97358eda58b7..81c4838423494632277a061d088d895dbde08063 100644
--- a/net/url_request/url_request_http_job.h
+++ b/net/url_request/url_request_http_job.h
@@ -107,6 +107,8 @@ class NET_EXPORT_PRIVATE URLRequestHttpJob : public URLRequestJob {
virtual bool GetResponseCookies(std::vector<std::string>* cookies) OVERRIDE;
virtual int GetResponseCode() const OVERRIDE;
virtual Filter* SetupFilter() const OVERRIDE;
+ virtual bool IsRedirectResponse(
+ GURL* location, int* http_status_code) OVERRIDE;
virtual bool IsSafeRedirect(const GURL& location) OVERRIDE;
virtual bool NeedsAuth() OVERRIDE;
virtual void GetAuthChallengeInfo(scoped_refptr<AuthChallengeInfo>*) OVERRIDE;
@@ -249,6 +251,11 @@ class NET_EXPORT_PRIVATE URLRequestHttpJob : public URLRequestJob {
CompletionCallback on_headers_received_callback_;
+ // We allow the network delegate to redirect the response. If an URL is given,
+ // the response headers (except for the cookies) will be ignored and the job
+ // will restart using this new URL.
+ GURL override_redirect_url_;
+
// We allow the network delegate to modify a copy of the response headers.
// This prevents modifications of headers that are shared with the underlying
// layers of the network stack.

Powered by Google App Engine
This is Rietveld 408576698