summaryrefslogtreecommitdiffstats
path: root/content/renderer
diff options
context:
space:
mode:
authorhoro@chromium.org <horo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-10 08:06:52 +0000
committerhoro@chromium.org <horo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-10 08:06:52 +0000
commitc1e8115dcbf850c920e625bd7f6afa696d90f057 (patch)
tree01f4c8bf57a756fe9e483e7a19450dbb96c1baa3 /content/renderer
parent9680d5de776e636ea26b4722aab8e4d405ce124e (diff)
downloadchromium_src-c1e8115dcbf850c920e625bd7f6afa696d90f057.zip
chromium_src-c1e8115dcbf850c920e625bd7f6afa696d90f057.tar.gz
chromium_src-c1e8115dcbf850c920e625bd7f6afa696d90f057.tar.bz2
[ServiceWorker] Fills the referrer of WebServiceWorkerRequest.
This change depends on http://crrev.com/329853012 The tests for this change will be added in the LayoutTests of Blink: http://crrev.com/373713004 BUG=373120 Review URL: https://codereview.chromium.org/373713003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282283 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer')
-rw-r--r--content/renderer/service_worker/service_worker_script_context.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/content/renderer/service_worker/service_worker_script_context.cc b/content/renderer/service_worker/service_worker_script_context.cc
index 59264e5..0f56e3f 100644
--- a/content/renderer/service_worker/service_worker_script_context.cc
+++ b/content/renderer/service_worker/service_worker_script_context.cc
@@ -10,6 +10,7 @@
#include "content/common/service_worker/service_worker_messages.h"
#include "content/renderer/service_worker/embedded_worker_context_client.h"
#include "ipc/ipc_message.h"
+#include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
#include "third_party/WebKit/public/platform/WebServiceWorkerRequest.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
@@ -135,6 +136,8 @@ void ServiceWorkerScriptContext::OnFetchEvent(
webRequest.setHeader(blink::WebString::fromUTF8(it->first),
blink::WebString::fromUTF8(it->second));
}
+ webRequest.setReferrer(blink::WebString::fromUTF8(request.referrer.spec()),
+ blink::WebReferrerPolicyDefault);
webRequest.setIsReload(request.is_reload);
proxy_->dispatchFetchEvent(request_id, webRequest);
}