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

Unified Diff: net/base/network_delegate.h

Issue 154473002: Support redirectUrl at onHeadersReceived in WebRequest / DWR API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +net test, fix nit 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/base/network_delegate.h
diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h
index 882701ce5b0b02f5b402fd6433f87ce588651c35..6b74bbf823345ea87587b3e1638cbaf4744c5968 100644
--- a/net/base/network_delegate.h
+++ b/net/base/network_delegate.h
@@ -68,6 +68,7 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
int NotifyHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
+ GURL* new_url,
const HttpResponseHeaders* original_response_headers,
scoped_refptr<HttpResponseHeaders>* override_response_headers);
void NotifyBeforeRedirect(URLRequest* request,
@@ -129,6 +130,7 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
const HttpRequestHeaders& headers);
// Called for HTTP requests when the headers have been received.
+ // Allows delegate to rewrite the URL being fetched by modifying |new_url|.
// |original_response_headers| contains the headers as received over the
// network, these must not be modified. |override_response_headers| can be set
// to new values, that should be considered as overriding
@@ -139,6 +141,7 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
virtual int OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
+ GURL* new_url,
const HttpResponseHeaders* original_response_headers,
scoped_refptr<HttpResponseHeaders>* override_response_headers);

Powered by Google App Engine
This is Rietveld 408576698