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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 21302005: Add CurrentProcessInfo::CreationTime() for Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac Created 7 years, 4 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 | « base/process/process_metrics_linux.cc ('k') | chrome/browser/chrome_process_finder_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 8b71ef337f3692d9b99742f71f0f4140c48dc39b..c023c1f530880019e0b29124f9a744bfd7da2af5 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -689,17 +689,17 @@ void ChromeBrowserMainParts::RecordBrowserStartupTime(bool is_first_run) {
if (startup_metric_utils::WasNonBrowserUIDisplayed())
return;
-// CurrentProcessInfo::CreationTime() is currently only implemented on Mac and
-// Windows.
-#if defined(OS_MACOSX) || defined(OS_WIN)
- const base::Time* process_creation_time =
+// CurrentProcessInfo::CreationTime() is currently only implemented on some
+// platforms.
+#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
+ const base::Time process_creation_time =
base::CurrentProcessInfo::CreationTime();
- if (!is_first_run && process_creation_time) {
+ if (!is_first_run && !process_creation_time.is_null()) {
RecordPreReadExperimentTime("Startup.BrowserMessageLoopStartTime",
- base::Time::Now() - *process_creation_time);
+ base::Time::Now() - process_creation_time);
}
-#endif // defined(OS_MACOSX) || defined(OS_WIN)
+#endif // defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
// Record collected startup metrics.
startup_metric_utils::OnBrowserStartupComplete(is_first_run);
« no previous file with comments | « base/process/process_metrics_linux.cc ('k') | chrome/browser/chrome_process_finder_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698