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

Unified Diff: chrome_frame/chrome_active_document.cc

Issue 2824057: Chromeframe user-agent without need of HttpNegotiate patch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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
« no previous file with comments | « chrome_frame/bho.cc ('k') | chrome_frame/http_negotiate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/chrome_active_document.cc
===================================================================
--- chrome_frame/chrome_active_document.cc (revision 52547)
+++ chrome_frame/chrome_active_document.cc (working copy)
@@ -264,7 +264,16 @@
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;
« no previous file with comments | « chrome_frame/bho.cc ('k') | chrome_frame/http_negotiate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698