diff options
author | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-04 18:23:48 +0000 |
---|---|---|
committer | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-04 18:23:48 +0000 |
commit | 457c9dfbea567a65706231cfdbbeedf0f62ebed4 (patch) | |
tree | 83470c4326230d2ffa41d7574db34dfeacaabdf2 /ceee | |
parent | aef09df947b73d3d10c4d7d6b8415d690239ec30 (diff) | |
download | chromium_src-457c9dfbea567a65706231cfdbbeedf0f62ebed4.zip chromium_src-457c9dfbea567a65706231cfdbbeedf0f62ebed4.tar.gz chromium_src-457c9dfbea567a65706231cfdbbeedf0f62ebed4.tar.bz2 |
Restored missing BrokerRpcClient::Connect.
Fixed leaking of BrokerRpcClient.
BUG=65392
TEST=none
Review URL: http://codereview.chromium.org/5610004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68290 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ceee')
-rw-r--r-- | ceee/ie/plugin/bho/cookie_accountant.h | 8 | ||||
-rw-r--r-- | ceee/ie/plugin/bho/executor.cc | 14 | ||||
-rw-r--r-- | ceee/ie/plugin/bho/executor.h | 3 | ||||
-rw-r--r-- | ceee/ie/plugin/bho/webrequest_notifier.cc | 5 | ||||
-rw-r--r-- | ceee/ie/plugin/bho/webrequest_notifier.h | 3 |
5 files changed, 28 insertions, 5 deletions
diff --git a/ceee/ie/plugin/bho/cookie_accountant.h b/ceee/ie/plugin/bho/cookie_accountant.h index 46efd20..8e7423b 100644 --- a/ceee/ie/plugin/bho/cookie_accountant.h +++ b/ceee/ie/plugin/bho/cookie_accountant.h @@ -54,8 +54,11 @@ class CookieAccountant { // queue the events sent to the broker. They don't need to be sent to the BHO // because they don't need tab_id anyway. CookieAccountant() - : cookie_events_funnel_(new BrokerRpcClient(true)), + : broker_rpc_client_(true), + cookie_events_funnel_(&broker_rpc_client_), patching_wininet_functions_(false) { + HRESULT hr = broker_rpc_client_.Connect(true); + DCHECK(SUCCEEDED(hr)); } virtual ~CookieAccountant(); @@ -110,6 +113,9 @@ class CookieAccountant { // Sets the cookie store ID for a script cookie event. void SetScriptCookieStoreId(cookie_api::CookieInfo* cookie); + // Broker RPC client. + BrokerRpcClient broker_rpc_client_; + // The funnel for sending cookie events to the broker. CookieEventsFunnel cookie_events_funnel_; diff --git a/ceee/ie/plugin/bho/executor.cc b/ceee/ie/plugin/bho/executor.cc index 9e2dc60..56c8e97 100644 --- a/ceee/ie/plugin/bho/executor.cc +++ b/ceee/ie/plugin/bho/executor.cc @@ -370,7 +370,11 @@ HRESULT AsyncTabCall::Signal() { return hr; } -CeeeExecutor::CeeeExecutor() : hwnd_(NULL) { +CeeeExecutor::CeeeExecutor() + : hwnd_(NULL), + // Don't restart on broker crash. It won't work because executor was + // already registered in dead broker. + broker_rpc_client_(false) { } CeeeExecutor::~CeeeExecutor() { @@ -426,9 +430,13 @@ HRESULT CeeeExecutor::Initialize(CeeeWindowHandle hwnd) { // Infobar. In any case, the construction below should have a reference to // a BHO and its EventSender so we don't create Infobars before the tab_id // is ready. - if (window_utils::GetTopLevelParent(hwnd_) != hwnd_) + if (window_utils::GetTopLevelParent(hwnd_) != hwnd_) { + hr = broker_rpc_client_.Connect(true); + if (FAILED(hr)) + return hr; infobar_manager_.reset( - new infobar_api::InfobarManager(hwnd_, new BrokerRpcClient(false))); + new infobar_api::InfobarManager(hwnd_, &broker_rpc_client_)); + } return S_OK; } diff --git a/ceee/ie/plugin/bho/executor.h b/ceee/ie/plugin/bho/executor.h index 7df38fe..63ec87a 100644 --- a/ceee/ie/plugin/bho/executor.h +++ b/ceee/ie/plugin/bho/executor.h @@ -272,6 +272,9 @@ class ATL_NO_VTABLE CeeeExecutor // Mainly for unit testing purposes. void set_cookie_store_is_registered(bool is_registered); + // Broker RPC client. + BrokerRpcClient broker_rpc_client_; + // Instance of InfobarManager for the tab associated with the thread to which // the executor is attached. scoped_ptr<infobar_api::InfobarManager> infobar_manager_; diff --git a/ceee/ie/plugin/bho/webrequest_notifier.cc b/ceee/ie/plugin/bho/webrequest_notifier.cc index 609dc45..5f65a8b 100644 --- a/ceee/ie/plugin/bho/webrequest_notifier.cc +++ b/ceee/ie/plugin/bho/webrequest_notifier.cc @@ -32,7 +32,10 @@ WebRequestNotifier::WebRequestNotifier() : internet_status_callback_stub_(NULL), start_count_(0), initialize_state_(NOT_INITIALIZED), - webrequest_events_funnel_(new BrokerRpcClient(true)) { + broker_rpc_client_(true), + webrequest_events_funnel_(&broker_rpc_client_) { + HRESULT hr = broker_rpc_client_.Connect(true); + DCHECK(SUCCEEDED(hr)); } WebRequestNotifier::~WebRequestNotifier() { diff --git a/ceee/ie/plugin/bho/webrequest_notifier.h b/ceee/ie/plugin/bho/webrequest_notifier.h index 2529c42..0676bf65 100644 --- a/ceee/ie/plugin/bho/webrequest_notifier.h +++ b/ceee/ie/plugin/bho/webrequest_notifier.h @@ -400,6 +400,9 @@ class WebRequestNotifier { app::win::IATPatchFunction http_send_request_w_patch_; app::win::IATPatchFunction internet_read_file_patch_; + // Broker RPC client. + BrokerRpcClient broker_rpc_client_; + // The funnel for sending webRequest events to the broker. WebRequestEventsFunnel webrequest_events_funnel_; |