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

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: 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 f6b87a44cf44c3b7fb3332e0e9115d9df864f871..63fc659ebddced3be921344d25f8d89ea538ccba 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"
@@ -92,6 +93,8 @@ void ReadyModeDelegateImpl::DisableChromeFrame() {
} // namespace
STDMETHODIMP Bho::SetSite(IUnknown* site) {
+ base::TimeTicks start = base::TimeTicks::Now();
grt (UTC plus 2) 2012/06/28 13:55:04 move this down to line 100?
robertshield 2012/06/28 14:11:14 Done.
+
HRESULT hr = S_OK;
if (site) {
base::win::ScopedComPtr<IWebBrowser2> web_browser2;
@@ -125,6 +128,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);
grt (UTC plus 2) 2012/06/28 13:55:04 delta.InMilliseconds()
robertshield 2012/06/28 14:11:14 The macro already does that.
} 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