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

Unified Diff: net/url_request/url_request_test_util.h

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_job_manager.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 5784931383459fc451de777423c7e00d645d30e3..1289db73434b764ee323781590412bfacc6092e0 100644
--- a/net/url_request/url_request_test_util.h
+++ b/net/url_request/url_request_test_util.h
@@ -275,12 +275,18 @@ class TestNetworkDelegate : public NetworkDelegate {
int observed_before_proxy_headers_sent_callbacks() const {
return observed_before_proxy_headers_sent_callbacks_;
}
+ int before_send_headers_count() const { return before_send_headers_count_; }
+ int headers_received_count() const { return headers_received_count_; }
// Last observed proxy in proxy header sent callback.
HostPortPair last_observed_proxy() {
return last_observed_proxy_;
}
+ void set_can_be_intercepted_on_error(bool can_be_intercepted_on_error) {
+ will_be_intercepted_on_next_error_ = can_be_intercepted_on_error;
+ }
+
protected:
// NetworkDelegate:
int OnBeforeURLRequest(URLRequest* request,
@@ -343,6 +349,8 @@ class TestNetworkDelegate : public NetworkDelegate {
int blocked_set_cookie_count_;
int set_cookie_count_;
int observed_before_proxy_headers_sent_callbacks_;
+ int before_send_headers_count_;
+ int headers_received_count_;
// Last observed proxy in before proxy header sent callback.
HostPortPair last_observed_proxy_;
@@ -365,6 +373,7 @@ class TestNetworkDelegate : public NetworkDelegate {
bool can_access_files_; // true by default
bool can_throttle_requests_; // true by default
bool cancel_request_with_policy_violating_referrer_; // false by default
+ bool will_be_intercepted_on_next_error_;
};
// Overrides the host used by the LocalHttpTestServer in
« no previous file with comments | « net/url_request/url_request_job_manager.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