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

Unified Diff: chrome_frame/http_negotiate.cc

Issue 6279006: Enable the ChromeFrame IHttpNegotiate patch for all IE versions. Ensure that ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/http_negotiate.cc
===================================================================
--- chrome_frame/http_negotiate.cc (revision 71693)
+++ chrome_frame/http_negotiate.cc (working copy)
@@ -231,10 +231,19 @@
return hr;
}
if (modify_user_agent_) {
- std::string updated(AppendCFUserAgentString(headers, *additional_headers));
+ std::string updated_headers;
+ if (IsGcfDefaultRenderer() &&
+ RendererTypeForUrl(url) == RENDERER_TYPE_CHROME_DEFAULT_RENDERER) {
+ // Replace the user-agent header with Chrome's.
+ updated_headers = ReplaceOrAddUserAgent(*additional_headers,
+ http_utils::GetChromeUserAgent());
+ } else {
+ updated_headers = AppendCFUserAgentString(headers, *additional_headers);
+ }
*additional_headers = reinterpret_cast<wchar_t*>(::CoTaskMemRealloc(
- *additional_headers, (updated.length() + 1) * sizeof(wchar_t)));
- lstrcpyW(*additional_headers, ASCIIToWide(updated).c_str());
+ *additional_headers,
+ (updated_headers.length() + 1) * sizeof(wchar_t)));
+ lstrcpyW(*additional_headers, ASCIIToWide(updated_headers).c_str());
}
return S_OK;
}
« no previous file with comments | « chrome_frame/bho.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698