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

Unified Diff: net/url_request/url_request_test_util.h

Issue 333113002: Move data reduction proxy to Chrome-Proxy header for authentication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@flywheel-refactor-net-fake-a-redirect-response-headers-chrome-proxy-auth
Patch Set: errata Created 6 years, 6 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 ebd02c4aca5059837b7f76100e34444a2849fbd4..28613ce94fe6be016947ba60cc82afac55022d75 100644
--- a/net/url_request/url_request_test_util.h
+++ b/net/url_request/url_request_test_util.h
@@ -274,6 +274,15 @@ class TestNetworkDelegate : public NetworkDelegate {
void set_can_throttle_requests(bool val) { can_throttle_requests_ = val; }
bool can_throttle_requests() const { return can_throttle_requests_; }
+ int observed_before_proxy_headers_sent_callbacks() const {
+ return observed_before_proxy_headers_sent_callbacks_;
+ }
+
+ // Last observed proxy in proxy header sent callback.
+ HostPortPair last_observed_proxy() {
+ return last_observed_proxy_;
+ }
+
protected:
// NetworkDelegate:
virtual int OnBeforeURLRequest(URLRequest* request,
@@ -282,6 +291,10 @@ class TestNetworkDelegate : public NetworkDelegate {
virtual int OnBeforeSendHeaders(URLRequest* request,
const CompletionCallback& callback,
HttpRequestHeaders* headers) OVERRIDE;
+ virtual void OnBeforeSendProxyHeaders(
+ net::URLRequest* request,
+ const net::ProxyInfo& proxy_info,
+ net::HttpRequestHeaders* headers) OVERRIDE;
virtual void OnSendHeaders(URLRequest* request,
const HttpRequestHeaders& headers) OVERRIDE;
virtual int OnHeadersReceived(
@@ -333,6 +346,9 @@ class TestNetworkDelegate : public NetworkDelegate {
int blocked_get_cookies_count_;
int blocked_set_cookie_count_;
int set_cookie_count_;
+ int observed_before_proxy_headers_sent_callbacks_;
+ // Last observed proxy in before proxy header sent callback.
+ HostPortPair last_observed_proxy_;
// NetworkDelegate callbacks happen in a particular order (e.g.
// OnBeforeURLRequest is always called before OnBeforeSendHeaders).
« 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