Chromium Code Reviews| Index: ceee/ie/plugin/toolband/tool_band.cc |
| =================================================================== |
| --- ceee/ie/plugin/toolband/tool_band.cc (revision 67716) |
| +++ ceee/ie/plugin/toolband/tool_band.cc (working copy) |
| @@ -57,6 +57,7 @@ |
| listening_to_browser_events_(false), |
| band_id_(0), |
| is_quitting_(false), |
| + already_sent_id_to_bho_(false), |
| current_width_(kToolBandMinWidth), |
| current_height_(kToolBandHeight) { |
| TRACE_EVENT_BEGIN("ceee.toolband", this, ""); |
| @@ -742,6 +743,8 @@ |
| } |
| HRESULT ToolBand::SendSessionIdToBho(IUnknown* bho) { |
| + if (already_sent_id_to_bho_) |
| + return S_FALSE; |
|
motek.
2010/11/30 22:33:09
I am not sure if the return value of 'Ensure' shou
Cindy Lau
2010/12/01 00:01:36
See my comment above.
|
| // Now send the tool band's session ID to the BHO. |
| ScopedComPtr<ICeeeBho> ceee_bho; |
| HRESULT hr = ceee_bho.QueryFrom(bho); |
| @@ -749,7 +752,10 @@ |
| int session_id = 0; |
| hr = GetSessionId(&session_id); |
| if (SUCCEEDED(hr)) { |
| - return ceee_bho->SetToolBandSessionId(session_id); |
| + hr = ceee_bho->SetToolBandSessionId(session_id); |
| + if (SUCCEEDED(hr)) |
| + already_sent_id_to_bho_ = true; |
| + return hr; |
| } |
| } |
| return E_FAIL; |