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 0c342f427e6647b46bf7aefd220ec5d34126dd2b..cad472e4b62edfb8f04297407a4d74cb1fe7fcbb 100644 |
--- a/net/url_request/url_request_test_util.h |
+++ b/net/url_request/url_request_test_util.h |
@@ -269,6 +269,10 @@ class TestNetworkDelegate : public NetworkDelegate { |
void set_can_throttle_requests(bool val) { can_throttle_requests_ = val; } |
bool can_throttle_requests() const { return can_throttle_requests_; } |
+ void set_cancel_request_with_policy_violating_referrer(bool val) { |
+ cancel_request_with_policy_violating_referrer_ = val; |
+ } |
+ |
int observed_before_proxy_headers_sent_callbacks() const { |
return observed_before_proxy_headers_sent_callbacks_; |
} |
@@ -324,6 +328,10 @@ class TestNetworkDelegate : public NetworkDelegate { |
virtual int OnBeforeSocketStreamConnect( |
SocketStream* stream, |
const CompletionCallback& callback) OVERRIDE; |
+ virtual bool OnCancelURLRequestWithPolicyViolatingReferrerHeader( |
+ const URLRequest& request, |
+ const GURL& target_url, |
+ const GURL& referrer_url) const OVERRIDE; |
void InitRequestStatesIfNew(int request_id); |
@@ -363,6 +371,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 |
}; |
// Overrides the host used by the LocalHttpTestServer in |