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

Unified Diff: net/url_request/url_request_test_util.h

Issue 154473002: Support redirectUrl at onHeadersReceived in WebRequest / DWR API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix WebRequestRulesRegistrySimpleTest.StageChecker test Created 6 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 | « net/url_request/url_request_http_job.cc ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_test_util.h
diff --git a/net/url_request/url_request_test_util.h b/net/url_request/url_request_test_util.h
index ebfa839f573b034e393c0fdc94f8548c2ced3b21..0b2f48cdbee7095068a14f0fa91bf120b5b9fdde 100644
--- a/net/url_request/url_request_test_util.h
+++ b/net/url_request/url_request_test_util.h
@@ -241,6 +241,10 @@ class TestNetworkDelegate : public NetworkDelegate {
redirect_on_headers_received_url_ = redirect_on_headers_received_url;
}
+ void set_allowed_unsafe_redirect_url(GURL allowed_unsafe_redirect_url) {
+ allowed_unsafe_redirect_url_ = allowed_unsafe_redirect_url;
+ }
+
void set_cookie_options(int o) {cookie_options_bit_mask_ = o; }
int last_error() const { return last_error_; }
@@ -273,7 +277,8 @@ class TestNetworkDelegate : public NetworkDelegate {
URLRequest* request,
const CompletionCallback& callback,
const HttpResponseHeaders* original_response_headers,
- scoped_refptr<HttpResponseHeaders>* override_response_headers) OVERRIDE;
+ scoped_refptr<HttpResponseHeaders>* override_response_headers,
+ GURL* allowed_unsafe_redirect_url) OVERRIDE;
virtual void OnBeforeRedirect(URLRequest* request,
const GURL& new_location) OVERRIDE;
virtual void OnResponseStarted(URLRequest* request) OVERRIDE;
@@ -304,6 +309,8 @@ class TestNetworkDelegate : public NetworkDelegate {
void InitRequestStatesIfNew(int request_id);
GURL redirect_on_headers_received_url_;
+ // URL marked as safe for redirection at the onHeadersReceived stage.
+ GURL allowed_unsafe_redirect_url_;
int last_error_;
int error_count_;
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698