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

Unified Diff: chrome/browser/safe_browsing/database_manager.cc

Issue 11785014: Record metrics for slow startups (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixup Created 7 years, 11 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
Index: chrome/browser/safe_browsing/database_manager.cc
diff --git a/chrome/browser/safe_browsing/database_manager.cc b/chrome/browser/safe_browsing/database_manager.cc
index 5c82eed240a38109d70a36411a4a7c63a110b822..849e294e592bf4320b8917fd255ce31ceb68e7f4 100644
--- a/chrome/browser/safe_browsing/database_manager.cc
+++ b/chrome/browser/safe_browsing/database_manager.cc
@@ -27,6 +27,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/startup_metric_utils.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
@@ -500,6 +501,8 @@ SafeBrowsingDatabase* SafeBrowsingDatabaseManager::GetDatabase() {
DCHECK_EQ(MessageLoop::current(), safe_browsing_thread_->message_loop());
if (database_)
return database_;
+ startup_metric_utils::ScopedSlowStartupUMA
+ scoped_timer("Startup.SlowStartupSafeBrowsingGetDatabase");
Scott Hess - ex-Googler 2013/01/07 21:47:25 I believe that this will measure the time to load
const base::TimeTicks before = base::TimeTicks::Now();
SafeBrowsingDatabase* database =

Powered by Google App Engine
This is Rietveld 408576698