summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-05 09:33:13 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-05 09:33:13 +0000
commit7deade438ac8b49df4bd54ccb5d508a1527e02e5 (patch)
treed02c8ebd63b4555a833e48fc12f30efa34fcbe89 /chrome/renderer
parent21f4d251210a4408da8a3279510ef7eb44cc1e1a (diff)
downloadchromium_src-7deade438ac8b49df4bd54ccb5d508a1527e02e5.zip
chromium_src-7deade438ac8b49df4bd54ccb5d508a1527e02e5.tar.gz
chromium_src-7deade438ac8b49df4bd54ccb5d508a1527e02e5.tar.bz2
When --no-referrers is given, also remove Referer header on WebKit side of the world.
TEST=Start with --no-referrers, neither headers nor document.referrer should ever get set BUG=none Review URL: http://codereview.chromium.org/668065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40724 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/render_view.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 4e49019..1e72592 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -2751,6 +2751,9 @@ void RenderView::willSendRequest(
request.setCachePolicy(state->cache_policy_override());
}
request.setRequestorID(routing_id_);
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoReferrers)) {
+ request.clearHTTPHeaderField("Referer");
+ }
}
void RenderView::didReceiveResponse(