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

Unified Diff: chrome/browser/performance_monitor/startup_timer.cc

Issue 23825004: PerformanceMonitor: UMA alert for high browser CPU usage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed dependencies. Created 7 years, 3 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/performance_monitor/startup_timer.cc
diff --git a/chrome/browser/performance_monitor/startup_timer.cc b/chrome/browser/performance_monitor/startup_timer.cc
index d6aee739478631efeda8801b3b6c2a445acb8137..c18e975f8ddbbefbc1ab9357a598a738888233a6 100644
--- a/chrome/browser/performance_monitor/startup_timer.cc
+++ b/chrome/browser/performance_monitor/startup_timer.cc
@@ -90,10 +90,13 @@ void StartupTimer::Observe(int type,
const content::NotificationDetails& details) {
CHECK(type == chrome::NOTIFICATION_PERFORMANCE_MONITOR_INITIALIZED);
performance_monitor_initialized_ = true;
- if (elapsed_startup_time_ != base::TimeDelta())
- InsertElapsedStartupTime();
- if (elapsed_session_restore_times_.size())
- InsertElapsedSessionRestoreTime();
+
+ if (PerformanceMonitor::GetInstance()->IsDatabaseLoggingEnabled()) {
+ if (elapsed_startup_time_ != base::TimeDelta())
+ InsertElapsedStartupTime();
+ if (elapsed_session_restore_times_.size())
+ InsertElapsedSessionRestoreTime();
+ }
}
// static

Powered by Google App Engine
This is Rietveld 408576698