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

Unified Diff: chrome_frame/bho.cc

Issue 10704017: Adding Chrome Frame metric for SetSite performance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 8 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/bho.cc
diff --git a/chrome_frame/bho.cc b/chrome_frame/bho.cc
index 240cd1da7973fe1baabb6da79301ce9bc989d939..4ca4718c18799365849427e31a429e1ab52ad592 100644
--- a/chrome_frame/bho.cc
+++ b/chrome_frame/bho.cc
@@ -11,6 +11,7 @@
#include "base/path_service.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
+#include "base/time.h"
#include "base/win/scoped_bstr.h"
#include "chrome_frame/buggy_bho_handling.h"
#include "chrome_frame/crash_reporting/crash_metrics.h"
@@ -72,6 +73,7 @@ void Bho::FinalRelease() {
STDMETHODIMP Bho::SetSite(IUnknown* site) {
HRESULT hr = S_OK;
if (site) {
+ base::TimeTicks start = base::TimeTicks::Now();
base::win::ScopedComPtr<IWebBrowser2> web_browser2;
web_browser2.QueryFrom(site);
if (web_browser2) {
@@ -101,6 +103,9 @@ STDMETHODIMP Bho::SetSite(IUnknown* site) {
DLOG(WARNING) << "Failed to bump up HTTP connections. Error:"
<< ::GetLastError();
}
+
+ base::TimeDelta delta = base::TimeTicks::Now() - start;
+ UMA_HISTOGRAM_TIMES("ChromeFrame.BhoLoadSetSite", delta);
} else {
UnregisterThreadInstance();
buggy_bho::BuggyBhoTls::DestroyInstance();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698