diff options
author | jochen <jochen@chromium.org> | 2014-09-16 11:31:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-16 18:34:35 +0000 |
commit | 0e3b3a6c53b408ea11cdab0a46d12ea905782821 (patch) | |
tree | c4e90326961716fefcc174db5aa72490c6cbf5d6 /net/url_request/url_request_test_util.cc | |
parent | a337df3d8b29586e938948b0d53b2772baa0a4ad (diff) | |
download | chromium_src-0e3b3a6c53b408ea11cdab0a46d12ea905782821.zip chromium_src-0e3b3a6c53b408ea11cdab0a46d12ea905782821.tar.gz chromium_src-0e3b3a6c53b408ea11cdab0a46d12ea905782821.tar.bz2 |
Move handling of invalid referrer to the network delegate
We now always abort invalid loads. According to UMA, they don't happen
anymore, so this should only affect future bugs.
Also, move the UMA reporting to the right thread.
BUG=none
R=mmenke@chromium.org,mef@chromium.org,nasko@chromium.org
Review URL: https://codereview.chromium.org/572273002
Cr-Commit-Position: refs/heads/master@{#295107}
Diffstat (limited to 'net/url_request/url_request_test_util.cc')
-rw-r--r-- | net/url_request/url_request_test_util.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc index 2d3f3aa..82d8579 100644 --- a/net/url_request/url_request_test_util.cc +++ b/net/url_request/url_request_test_util.cc @@ -320,7 +320,8 @@ TestNetworkDelegate::TestNetworkDelegate() has_load_timing_info_before_redirect_(false), has_load_timing_info_before_auth_(false), can_access_files_(true), - can_throttle_requests_(true) { + can_throttle_requests_(true), + cancel_request_with_policy_violating_referrer_(false) { } TestNetworkDelegate::~TestNetworkDelegate() { @@ -604,6 +605,13 @@ int TestNetworkDelegate::OnBeforeSocketStreamConnect( return OK; } +bool TestNetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader( + const URLRequest& request, + const GURL& target_url, + const GURL& referrer_url) const { + return cancel_request_with_policy_violating_referrer_; +} + // static std::string ScopedCustomUrlRequestTestHttpHost::value_("127.0.0.1"); |