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

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
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..73de04015adf0ceae12066b8e7f84dc94ffa8acd 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_can_correct_invalid_referrer_header(bool val) {
+ can_correct_invalid_referrer_header_ = 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 OnCanCorrectInvalidReferrerHeader(
+ 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 can_correct_invalid_referrer_header_; // true by default
};
// Overrides the host used by the LocalHttpTestServer in

Powered by Google App Engine
This is Rietveld 408576698