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

Unified Diff: chrome/browser/ui/browser.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 | « chrome/browser/ui/app_list/app_list_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index a9835f42fadc907ab9edccfdc4f7e2f5f5c6f3d9..9b5e7ffc241f799cd9230dae5a82937dfca317df 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1211,25 +1211,24 @@ void Browser::OnWindowDidShow() {
return;
window_has_shown_ = true;
-// CurrentProcessInfo::CreationTime() is currently only implemented on Mac and
-// Windows.
-#if defined(OS_MACOSX) || defined(OS_WIN)
+// CurrentProcessInfo::CreationTime() is missing on some platforms.
+#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
// Measure the latency from startup till the first browser window becomes
// visible.
static bool is_first_browser_window = true;
if (is_first_browser_window &&
!startup_metric_utils::WasNonBrowserUIDisplayed()) {
is_first_browser_window = false;
- const base::Time* process_creation_time =
+ const base::Time process_creation_time =
base::CurrentProcessInfo::CreationTime();
- if (process_creation_time) {
+ if (!process_creation_time.is_null()) {
UMA_HISTOGRAM_LONG_TIMES(
"Startup.BrowserWindowDisplay",
- 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)
// Nothing to do for non-tabbed windows.
if (!is_type_tabbed())
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698