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

Side by Side Diff: chrome_frame/bho.cc

Issue 6493002: A number of poorly written IE BHO's crash IE if ChromeFrame is the currently ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome_frame/buggy_bho_handling.h » ('j') | chrome_frame/buggy_bho_handling.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome_frame/bho.h" 5 #include "chrome_frame/bho.h"
6 6
7 #include <shlguid.h> 7 #include <shlguid.h>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "base/stringprintf.h" 13 #include "base/stringprintf.h"
14 #include "base/win/scoped_bstr.h" 14 #include "base/win/scoped_bstr.h"
15 #include "chrome_tab.h" // NOLINT 15 #include "chrome_frame/buggy_bho_handling.h"
16 #include "chrome_frame/crash_reporting/crash_metrics.h" 16 #include "chrome_frame/crash_reporting/crash_metrics.h"
17 #include "chrome_frame/extra_system_apis.h" 17 #include "chrome_frame/extra_system_apis.h"
18 #include "chrome_frame/html_utils.h" 18 #include "chrome_frame/html_utils.h"
19 #include "chrome_frame/http_negotiate.h" 19 #include "chrome_frame/http_negotiate.h"
20 #include "chrome_frame/metrics_service.h" 20 #include "chrome_frame/metrics_service.h"
21 #include "chrome_frame/protocol_sink_wrap.h" 21 #include "chrome_frame/protocol_sink_wrap.h"
22 #include "chrome_frame/ready_mode/ready_mode.h" 22 #include "chrome_frame/ready_mode/ready_mode.h"
23 #include "chrome_frame/urlmon_moniker.h" 23 #include "chrome_frame/urlmon_moniker.h"
24 #include "chrome_frame/utils.h" 24 #include "chrome_frame/utils.h"
25 #include "chrome_frame/vtable_patch_manager.h" 25 #include "chrome_frame/vtable_patch_manager.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 } 131 }
132 } 132 }
133 // Save away our BHO instance in TLS which enables it to be referenced by 133 // Save away our BHO instance in TLS which enables it to be referenced by
134 // our active document/activex instances to query referrer and other 134 // our active document/activex instances to query referrer and other
135 // information for a URL. 135 // information for a URL.
136 AddRef(); 136 AddRef();
137 RegisterThreadInstance(); 137 RegisterThreadInstance();
138 MetricsService::Start(); 138 MetricsService::Start();
139 } else { 139 } else {
140 UnregisterThreadInstance(); 140 UnregisterThreadInstance();
141 buggy_bho::BuggyBhoTls::DestroyInstance();
142 ScopedComPtr<IWebBrowser2> web_browser2;
143 web_browser2.QueryFrom(m_spUnkSite);
144 DispEventUnadvise(web_browser2, &DIID_DWebBrowserEvents2);
tommi (sloooow) - chröme 2011/02/11 19:34:15 thanks :)
141 Release(); 145 Release();
142 } 146 }
143 147
144 return IObjectWithSiteImpl<Bho>::SetSite(site); 148 return IObjectWithSiteImpl<Bho>::SetSite(site);
145 } 149 }
146 150
147 STDMETHODIMP Bho::BeforeNavigate2(IDispatch* dispatch, VARIANT* url, 151 STDMETHODIMP Bho::BeforeNavigate2(IDispatch* dispatch, VARIANT* url,
148 VARIANT* flags, VARIANT* target_frame_name, VARIANT* post_data, 152 VARIANT* flags, VARIANT* target_frame_name, VARIANT* post_data,
149 VARIANT* headers, VARIANT_BOOL* cancel) { 153 VARIANT* headers, VARIANT_BOOL* cancel) {
150 if (!url || url->vt != VT_BSTR || url->bstrVal == NULL) { 154 if (!url || url->vt != VT_BSTR || url->bstrVal == NULL) {
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 } 384 }
381 } 385 }
382 386
383 void PatchHelper::UnpatchIfNeeded() { 387 void PatchHelper::UnpatchIfNeeded() {
384 if (state_ == PATCH_PROTOCOL) { 388 if (state_ == PATCH_PROTOCOL) {
385 g_trans_hooks.RevertHooks(); 389 g_trans_hooks.RevertHooks();
386 HttpNegotiatePatch::Uninitialize(); 390 HttpNegotiatePatch::Uninitialize();
387 } 391 }
388 state_ = UNKNOWN; 392 state_ = UNKNOWN;
389 } 393 }
OLDNEW
« no previous file with comments | « no previous file | chrome_frame/buggy_bho_handling.h » ('j') | chrome_frame/buggy_bho_handling.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698