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

Side by Side Diff: ceee/ie/plugin/bho/browser_helper_object.cc

Issue 5751001: Replace DCHECKs on InserCode and Navigate paths with LOG(ERROR) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // IE browser helper object implementation. 5 // IE browser helper object implementation.
6 #include "ceee/ie/plugin/bho/browser_helper_object.h" 6 #include "ceee/ie/plugin/bho/browser_helper_object.h"
7 7
8 #include <atlsafe.h> 8 #include <atlsafe.h>
9 #include <shlguid.h> 9 #include <shlguid.h>
10 10
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 default: 162 default:
163 counter_name += 'x'; 163 counter_name += 'x';
164 break; 164 break;
165 } 165 }
166 VLOG(1) << counter_name << "=" << time; 166 VLOG(1) << counter_name << "=" << time;
167 broker_rpc().SendUmaHistogramTimes(counter_name.c_str(), time); 167 broker_rpc().SendUmaHistogramTimes(counter_name.c_str(), time);
168 } 168 }
169 169
170 STDMETHODIMP BrowserHelperObject::SetSite(IUnknown* site) { 170 STDMETHODIMP BrowserHelperObject::SetSite(IUnknown* site) {
171 typedef IObjectWithSiteImpl<BrowserHelperObject> SuperSite; 171 typedef IObjectWithSiteImpl<BrowserHelperObject> SuperSite;
172 LOG(INFO) << "BHO's set site called with " << site;
mad-corp 2010/12/14 13:38:20 Please use VLOG(1)
172 173
173 // From experience, we know the site may be set multiple times. 174 // From experience, we know the site may be set multiple times.
174 // Let's ignore second and subsequent set or unset. 175 // Let's ignore second and subsequent set or unset.
175 if (site != NULL && m_spUnkSite.p != NULL || 176 if (site != NULL && m_spUnkSite.p != NULL ||
176 site == NULL && m_spUnkSite.p == NULL ) { 177 site == NULL && m_spUnkSite.p == NULL ) {
177 LOG(WARNING) << "Duplicate call to SetSite, previous site " 178 LOG(WARNING) << "Duplicate call to SetSite, previous site "
178 << m_spUnkSite.p << " new site " << site; 179 << m_spUnkSite.p << " new site " << site;
179 return S_OK; 180 return S_OK;
180 } 181 }
181 182
(...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 DCHECK(it->second != NULL); 1479 DCHECK(it->second != NULL);
1479 if (it->second != NULL) { 1480 if (it->second != NULL) {
1480 HRESULT hr = it->second->InsertCode(code, file, type); 1481 HRESULT hr = it->second->InsertCode(code, file, type);
1481 DCHECK(SUCCEEDED(hr)) << "IFrameEventHandler::InsertCode()" << 1482 DCHECK(SUCCEEDED(hr)) << "IFrameEventHandler::InsertCode()" <<
1482 com::LogHr(hr); 1483 com::LogHr(hr);
1483 } 1484 }
1484 } 1485 }
1485 } else if (web_browser_ != NULL) { 1486 } else if (web_browser_ != NULL) {
1486 ScopedFrameEventHandlerPtr handler; 1487 ScopedFrameEventHandlerPtr handler;
1487 HRESULT hr = GetBrowserHandler(web_browser_, handler.Receive()); 1488 HRESULT hr = GetBrowserHandler(web_browser_, handler.Receive());
1488 DCHECK(SUCCEEDED(hr) && handler != NULL) << com::LogHr(hr); 1489 LOG_IF(ERROR, FAILED(hr) || handler == NULL) <<
1490 "GetBrowserHandler fails in InsertCode: " << com::LogHr(hr);
1491 if (FAILED(hr))
1492 return hr;
1489 1493
1490 if (handler != NULL) { 1494 if (handler != NULL) {
1491 hr = handler->InsertCode(code, file, type); 1495 hr = handler->InsertCode(code, file, type);
1492 // TODO(joi@chromium.org) We don't DCHECK for now, because Chrome may have 1496 // TODO(joi@chromium.org) We don't DCHECK for now, because Chrome may have
1493 // multiple extensions loaded whereas CEEE only knows about a single 1497 // multiple extensions loaded whereas CEEE only knows about a single
1494 // extension. Clean this up once we support multiple extensions. 1498 // extension. Clean this up once we support multiple extensions.
1495 } 1499 }
1496 } 1500 }
1497 return S_OK; 1501 return S_OK;
1498 } 1502 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 return S_FALSE; 1638 return S_FALSE;
1635 } else { 1639 } else {
1636 return SendEventToBrokerImpl(event_name, event_args); 1640 return SendEventToBrokerImpl(event_name, event_args);
1637 } 1641 }
1638 } 1642 }
1639 1643
1640 HRESULT BrowserHelperObject::SendEventToBrokerImpl( 1644 HRESULT BrowserHelperObject::SendEventToBrokerImpl(
1641 const std::string& event_name, const std::string& event_args) { 1645 const std::string& event_name, const std::string& event_args) {
1642 return broker_rpc().FireEvent(event_name.c_str(), event_args.c_str()); 1646 return broker_rpc().FireEvent(event_name.c_str(), event_args.c_str());
1643 } 1647 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698