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

Unified Diff: net/base/network_delegate.cc

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/base/network_delegate.cc
diff --git a/net/base/network_delegate.cc b/net/base/network_delegate.cc
index 76d94abd2df9488d804ac07b9fc83f7745bfe504..06c39aedd89cda823b722bc3a425d506c4be2ae5 100644
--- a/net/base/network_delegate.cc
+++ b/net/base/network_delegate.cc
@@ -166,6 +166,14 @@ bool NetworkDelegate::CanEnablePrivacyMode(
return OnCanEnablePrivacyMode(url, first_party_for_cookies);
}
+bool NetworkDelegate::CanCorrectInvalidReferrerHeader(
+ const URLRequest& request,
+ const GURL& target_url,
+ const GURL& referrer_url) const {
+ DCHECK(CalledOnValidThread());
+ return OnCanCorrectInvalidReferrerHeader(request, target_url, referrer_url);
+}
+
int NetworkDelegate::OnBeforeURLRequest(URLRequest* request,
const CompletionCallback& callback,
GURL* new_url) {
@@ -269,4 +277,11 @@ int NetworkDelegate::OnBeforeSocketStreamConnect(
return OK;
}
+bool NetworkDelegate::OnCanCorrectInvalidReferrerHeader(
+ const URLRequest& request,
+ const GURL& target_url,
+ const GURL& referrer_url) const {
+ return true;
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698