diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-17 22:39:03 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-17 22:39:03 +0000 |
commit | fe522afac00dfb9b736cea828df64ac713d1052a (patch) | |
tree | 2998233cc33a080b46ce63cb93760c24a4eceeb7 /chrome_frame/bho.cc | |
parent | 541af713a1aee523a8870f3291ec06c19d24c2e3 (diff) | |
download | chromium_src-fe522afac00dfb9b736cea828df64ac713d1052a.zip chromium_src-fe522afac00dfb9b736cea828df64ac713d1052a.tar.gz chromium_src-fe522afac00dfb9b736cea828df64ac713d1052a.tar.bz2 |
Restore the IHttpNegotiate patch in ChromeFrame for IE9 which sends the short UA string
by default without the Post Platform values which we rely on. This reverts back to the
old behavior for IE9 with the bug that certain top level requests like Refresh on a page
rendered in IE will be sent out with the UA string without the chrome frame suffix.
BUG=45087
TEST=Covered by old http negotiate unit test.
Review URL: http://codereview.chromium.org/5957001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69586 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/bho.cc')
-rw-r--r-- | chrome_frame/bho.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome_frame/bho.cc b/chrome_frame/bho.cc index 7fbc473..f7e8129 100644 --- a/chrome_frame/bho.cc +++ b/chrome_frame/bho.cc @@ -319,6 +319,12 @@ bool PatchHelper::InitializeAndPatchProtocolsIfNeeded() { if (state_ == UNKNOWN) { g_trans_hooks.InstallHooks(); + // IE9 sends the short user agent by default. To enable websites to + // identify and send content specific to chrome frame we need the + // negotiate patch which adds the user agent to outgoing requests. + if (GetIEVersion() == IE_9) { + HttpNegotiatePatch::Initialize(); + } state_ = PATCH_PROTOCOL; ret = true; } @@ -339,9 +345,9 @@ void PatchHelper::PatchBrowserService(IBrowserService* browser_service) { void PatchHelper::UnpatchIfNeeded() { if (state_ == PATCH_PROTOCOL) { g_trans_hooks.RevertHooks(); - } else if (state_ == PATCH_IBROWSER) { - vtable_patch::UnpatchInterfaceMethods(IBrowserService_PatchInfo); - MonikerPatch::Uninitialize(); + if (GetIEVersion() == IE_9) { + HttpNegotiatePatch::Uninitialize(); + } } state_ = UNKNOWN; } |