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

Unified Diff: net/url_request/url_request_test_util.h

Issue 572273002: Move handling of invalid referrer to the network delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 6 years, 3 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.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 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
« no previous file with comments | « net/url_request/url_request.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