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

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: Rebase 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
« no previous file with comments | « chrome/browser/performance_monitor/process_metrics_history.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..175ab6d49c922d7c67d95287bfe03161a1354c6b 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()->database_logging_enabled()) {
+ if (elapsed_startup_time_ != base::TimeDelta())
+ InsertElapsedStartupTime();
+ if (elapsed_session_restore_times_.size())
+ InsertElapsedSessionRestoreTime();
+ }
}
// static
« no previous file with comments | « chrome/browser/performance_monitor/process_metrics_history.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698