summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShimeng (Simon) Wang <swang@google.com>2010-03-18 11:17:50 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-03-18 11:17:50 -0700
commit46933a4c24222d22a162adf6f7dc6d99c820f80c (patch)
tree55d756d3027b11777ca6bb4625714b514de965f5
parent929b8b6c0a2c34098698d593df275ba8f4d50c39 (diff)
parentbc391117816060849e92a781b46e11396175f3aa (diff)
downloadexternal_webkit-46933a4c24222d22a162adf6f7dc6d99c820f80c.zip
external_webkit-46933a4c24222d22a162adf6f7dc6d99c820f80c.tar.gz
external_webkit-46933a4c24222d22a162adf6f7dc6d99c820f80c.tar.bz2
Merge "Fill in appropriate referer URL plugin initiated resource loading."
-rw-r--r--WebCore/plugins/PluginView.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/WebCore/plugins/PluginView.cpp b/WebCore/plugins/PluginView.cpp
index dc2b832..aadf0d2 100644
--- a/WebCore/plugins/PluginView.cpp
+++ b/WebCore/plugins/PluginView.cpp
@@ -268,6 +268,12 @@ bool PluginView::start()
FrameLoadRequest frameLoadRequest;
frameLoadRequest.resourceRequest().setHTTPMethod("GET");
frameLoadRequest.resourceRequest().setURL(m_url);
+#ifdef ANDROID_PLUGINS
+ if (!SecurityOrigin::shouldHideReferrer(
+ m_url, m_parentFrame->loader()->outgoingReferrer()))
+ frameLoadRequest.resourceRequest().setHTTPReferrer(
+ m_parentFrame->loader()->outgoingReferrer());
+#endif
load(frameLoadRequest, false, 0);
}
@@ -601,6 +607,11 @@ NPError PluginView::getURLNotify(const char* url, const char* target, void* noti
frameLoadRequest.setFrameName(target);
frameLoadRequest.resourceRequest().setHTTPMethod("GET");
frameLoadRequest.resourceRequest().setURL(makeURL(m_baseURL, url));
+#ifdef ANDROID_PLUGINS
+ if (!SecurityOrigin::shouldHideReferrer(
+ frameLoadRequest.resourceRequest().url(), m_url))
+ frameLoadRequest.resourceRequest().setHTTPReferrer(m_url);
+#endif
return load(frameLoadRequest, true, notifyData);
}
@@ -612,6 +623,11 @@ NPError PluginView::getURL(const char* url, const char* target)
frameLoadRequest.setFrameName(target);
frameLoadRequest.resourceRequest().setHTTPMethod("GET");
frameLoadRequest.resourceRequest().setURL(makeURL(m_baseURL, url));
+#ifdef ANDROID_PLUGINS
+ if (!SecurityOrigin::shouldHideReferrer(
+ frameLoadRequest.resourceRequest().url(), m_url))
+ frameLoadRequest.resourceRequest().setHTTPReferrer(m_url);
+#endif
return load(frameLoadRequest, false, 0);
}