summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ceee/ie/common/metrics_util.h2
-rw-r--r--ceee/ie/plugin/bho/browser_helper_object.cc19
2 files changed, 5 insertions, 16 deletions
diff --git a/ceee/ie/common/metrics_util.h b/ceee/ie/common/metrics_util.h
index fed8033..861a1b4 100644
--- a/ceee/ie/common/metrics_util.h
+++ b/ceee/ie/common/metrics_util.h
@@ -28,8 +28,6 @@ class ScopedTimer {
// Callers must ensure broker_rpc exceeds the life of this object.
ScopedTimer(const std::string name, BrokerRpcClient* broker_rpc)
: name_(name), broker_rpc_(broker_rpc), start_(base::TimeTicks::Now()) {
- CHECK(broker_rpc) << "Invalid parameter.";
-
if (name.length() == 0) {
NOTREACHED() << "Histogram name shouldn't be empty.";
broker_rpc_ = NULL; // Ensure we don't call the broker_rpc.
diff --git a/ceee/ie/plugin/bho/browser_helper_object.cc b/ceee/ie/plugin/bho/browser_helper_object.cc
index 40109c7..cc38336 100644
--- a/ceee/ie/plugin/bho/browser_helper_object.cc
+++ b/ceee/ie/plugin/bho/browser_helper_object.cc
@@ -134,8 +134,7 @@ STDMETHODIMP BrowserHelperObject::SetSite(IUnknown* site) {
}
if (NULL == site) {
- if (broker_rpc_ != NULL)
- mu::ScopedTimer metrics_timer("ceee/BHO.TearDown", broker_rpc_.get());
+ mu::ScopedTimer metrics_timer("ceee/BHO.TearDown", broker_rpc_.get());
// We're being torn down.
TearDown();
@@ -782,8 +781,7 @@ STDMETHODIMP_(void) BrowserHelperObject::OnBeforeNavigate2(
void BrowserHelperObject::OnBeforeNavigate2Impl(
const ScopedDispatchPtr& webbrowser_disp, const CComBSTR& url) {
- if (broker_rpc_ != NULL)
- mu::ScopedTimer metrics_timer("ceee/BHO.BeforeNavigate", broker_rpc_.get());
+ mu::ScopedTimer metrics_timer("ceee/BHO.BeforeNavigate", broker_rpc_.get());
base::win::ScopedComPtr<IWebBrowser2> webbrowser;
HRESULT hr = webbrowser.QueryFrom(webbrowser_disp);
@@ -848,10 +846,7 @@ STDMETHODIMP_(void) BrowserHelperObject::OnDocumentComplete(
void BrowserHelperObject::OnDocumentCompleteImpl(
const ScopedWebBrowser2Ptr& webbrowser, const CComBSTR& url) {
- if (broker_rpc_ != NULL) {
- mu::ScopedTimer metrics_timer("ceee/BHO.DocumentComplete",
- broker_rpc_.get());
- }
+ mu::ScopedTimer metrics_timer("ceee/BHO.DocumentComplete", broker_rpc_.get());
for (std::vector<Sink*>::iterator iter = sinks_.begin();
iter != sinks_.end(); ++iter) {
(*iter)->OnDocumentComplete(webbrowser, url);
@@ -890,10 +885,7 @@ STDMETHODIMP_(void) BrowserHelperObject::OnNavigateComplete2(
void BrowserHelperObject::OnNavigateComplete2Impl(
const ScopedWebBrowser2Ptr& webbrowser, const CComBSTR& url) {
- if (broker_rpc_ != NULL) {
- mu::ScopedTimer metrics_timer("ceee/BHO.NavigateComplete",
- broker_rpc_.get());
- }
+ mu::ScopedTimer metrics_timer("ceee/BHO.NavigateComplete", broker_rpc_.get());
HandleNavigateComplete(webbrowser, url);
@@ -944,8 +936,7 @@ STDMETHODIMP_(void) BrowserHelperObject::OnNavigateError(
void BrowserHelperObject::OnNavigateErrorImpl(
const ScopedWebBrowser2Ptr& webbrowser, const CComBSTR& url,
LONG status_code) {
- if (broker_rpc_ != NULL)
- mu::ScopedTimer metrics_timer("ceee/BHO.NavigateError", broker_rpc_.get());
+ mu::ScopedTimer metrics_timer("ceee/BHO.NavigateError", broker_rpc_.get());
for (std::vector<Sink*>::iterator iter = sinks_.begin();
iter != sinks_.end(); ++iter) {