diff options
author | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 16:54:12 +0000 |
---|---|---|
committer | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 16:54:12 +0000 |
commit | ce2b9f923c23700d24658b5118ab9c1d2f330d8b (patch) | |
tree | bdd559fc120cc9b5e5111a5c53efc4e3e0184466 /chrome_frame/bho.cc | |
parent | 78c7e2c68da0079869252bb464f4633373e5d067 (diff) | |
download | chromium_src-ce2b9f923c23700d24658b5118ab9c1d2f330d8b.zip chromium_src-ce2b9f923c23700d24658b5118ab9c1d2f330d8b.tar.gz chromium_src-ce2b9f923c23700d24658b5118ab9c1d2f330d8b.tar.bz2 |
A new way of hooking internet protocols.
TEST=chrome frame tests
Review URL: http://codereview.chromium.org/2620001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49265 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/bho.cc')
-rw-r--r-- | chrome_frame/bho.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/chrome_frame/bho.cc b/chrome_frame/bho.cc index 48838a9..6cdb0a6 100644 --- a/chrome_frame/bho.cc +++ b/chrome_frame/bho.cc @@ -123,8 +123,7 @@ STDMETHODIMP Bho::BeforeNavigate2(IDispatch* dispatch, VARIANT* url, if (is_top_level) { set_url(url->bstrVal); set_referrer(""); - // The moniker patch checks opt-in URLs in SniffData::DetermineRendererType. - if (!MonikerPatchEnabled()) { + if (IsIBrowserServicePatchEnabled()) { ProcessOptInUrls(web_browser2, url->bstrVal); } } @@ -320,10 +319,10 @@ bool PatchHelper::InitializeAndPatchProtocolsIfNeeded() { ProtocolPatchMethod patch_method = GetPatchMethod(); if (patch_method == PATCH_METHOD_INET_PROTOCOL) { - ProtocolSinkWrap::PatchProtocolHandlers(); + g_trans_hooks.InstallHooks(); state_ = PATCH_PROTOCOL; } else if (patch_method == PATCH_METHOD_IBROWSER) { - state_ = PATCH_IBROWSER; + state_ = PATCH_IBROWSER; } else { DCHECK(patch_method == PATCH_METHOD_MONIKER); state_ = PATCH_MONIKER; @@ -348,7 +347,7 @@ void PatchHelper::PatchBrowserService(IBrowserService* browser_service) { void PatchHelper::UnpatchIfNeeded() { if (state_ == PATCH_PROTOCOL) { - ProtocolSinkWrap::UnpatchProtocolHandlers(); + g_trans_hooks.RevertHooks(); } else if (state_ == PATCH_IBROWSER) { vtable_patch::UnpatchInterfaceMethods(IBrowserService_PatchInfo); MonikerPatch::Uninitialize(); |