Skip to content
Snippets Groups Projects
Commit 59d32b8d authored by joi@chromium.org's avatar joi@chromium.org
Browse files

Revert 68290 - Restored missing BrokerRpcClient::Connect.

Fixed leaking of BrokerRpcClient.

BUG=65392
TEST=none

Review URL: http://codereview.chromium.org/5610004

TBR=vitalybuka@chromium.org
Review URL: http://codereview.chromium.org/5533007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68293 0039d316-1c4b-4281-b951-d872f2087c98
parent 7cacc379
No related branches found
No related tags found
No related merge requests found
......@@ -54,11 +54,8 @@ 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()
: broker_rpc_client_(true),
cookie_events_funnel_(&broker_rpc_client_),
: cookie_events_funnel_(new BrokerRpcClient(true)),
patching_wininet_functions_(false) {
HRESULT hr = broker_rpc_client_.Connect(true);
DCHECK(SUCCEEDED(hr));
}
virtual ~CookieAccountant();
......@@ -113,9 +110,6 @@ 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_;
......
......@@ -370,11 +370,7 @@ HRESULT AsyncTabCall::Signal() {
return hr;
}
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() : hwnd_(NULL) {
}
CeeeExecutor::~CeeeExecutor() {
......@@ -430,13 +426,9 @@ 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_) {
hr = broker_rpc_client_.Connect(true);
if (FAILED(hr))
return hr;
if (window_utils::GetTopLevelParent(hwnd_) != hwnd_)
infobar_manager_.reset(
new infobar_api::InfobarManager(hwnd_, &broker_rpc_client_));
}
new infobar_api::InfobarManager(hwnd_, new BrokerRpcClient(false)));
return S_OK;
}
......
......@@ -272,9 +272,6 @@ 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_;
......
......@@ -32,10 +32,7 @@ WebRequestNotifier::WebRequestNotifier()
: internet_status_callback_stub_(NULL),
start_count_(0),
initialize_state_(NOT_INITIALIZED),
broker_rpc_client_(true),
webrequest_events_funnel_(&broker_rpc_client_) {
HRESULT hr = broker_rpc_client_.Connect(true);
DCHECK(SUCCEEDED(hr));
webrequest_events_funnel_(new BrokerRpcClient(true)) {
}
WebRequestNotifier::~WebRequestNotifier() {
......
......@@ -400,9 +400,6 @@ 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_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment