summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_active_document.cc
diff options
context:
space:
mode:
authorstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-17 04:02:58 +0000
committerstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-17 04:02:58 +0000
commitaaf124502e4c86acf98b88998fca3afcdb88a234 (patch)
tree3e163bb2cef2512464d8a3f54f2d2f42918a8f48 /chrome_frame/chrome_active_document.cc
parent962b98214d0ca8e8db14ae83ccb79667ec440eac (diff)
downloadchromium_src-aaf124502e4c86acf98b88998fca3afcdb88a234.zip
chromium_src-aaf124502e4c86acf98b88998fca3afcdb88a234.tar.gz
chromium_src-aaf124502e4c86acf98b88998fca3afcdb88a234.tar.bz2
BUG=47879
Review URL: http://codereview.chromium.org/2824057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52806 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_active_document.cc')
-rw-r--r--chrome_frame/chrome_active_document.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome_frame/chrome_active_document.cc b/chrome_frame/chrome_active_document.cc
index bd8d7a4..de06c75 100644
--- a/chrome_frame/chrome_active_document.cc
+++ b/chrome_frame/chrome_active_document.cc
@@ -265,7 +265,16 @@ STDMETHODIMP ChromeActiveDocument::Load(BOOL fully_avalable,
return E_INVALIDARG;
}
- const std::string& referrer = mgr ? mgr->referrer() : EmptyString();
+ std::string referrer = mgr ? mgr->referrer() : EmptyString();
+ // With CTransaction patch we have more robust way to grab the referrer for
+ // each top-level-switch-to-CF request by peeking at our sniffing data
+ // object that lives inside the bind context.
+ if (g_patch_helper.state() == PatchHelper::PATCH_PROTOCOL && info) {
+ scoped_refptr<ProtData> prot_data = info->get_prot_data();
+ if (prot_data)
+ referrer = prot_data->referrer();
+ }
+
if (!LaunchUrl(url, referrer, is_new_navigation)) {
NOTREACHED() << __FUNCTION__ << " Failed to launch url:" << url;
return E_INVALIDARG;