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

Side by Side Diff: chrome/browser/ui/app_list/app_list_service.cc

Issue 22594007: Implement CurrentProcessInfo::CreationTime() for Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add a ScopedAllowIO 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/app_list/app_list_service.h" 5 #include "chrome/browser/ui/app_list/app_list_service.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/prefs/pref_registry_simple.h" 9 #include "base/prefs/pref_registry_simple.h"
10 #include "base/process/process_info.h" 10 #include "base/process/process_info.h"
(...skipping 29 matching lines...) Expand all
40 void AppListService::RecordShowTimings(const CommandLine& command_line) { 40 void AppListService::RecordShowTimings(const CommandLine& command_line) {
41 // The presence of kOriginalProcessStartTime implies that another process 41 // The presence of kOriginalProcessStartTime implies that another process
42 // has sent us its command line to handle, ie: we are already running. 42 // has sent us its command line to handle, ie: we are already running.
43 if (command_line.HasSwitch(switches::kOriginalProcessStartTime)) { 43 if (command_line.HasSwitch(switches::kOriginalProcessStartTime)) {
44 base::TimeDelta elapsed = GetTimeFromOriginalProcessStart(command_line); 44 base::TimeDelta elapsed = GetTimeFromOriginalProcessStart(command_line);
45 if (command_line.HasSwitch(switches::kFastStart)) 45 if (command_line.HasSwitch(switches::kFastStart))
46 UMA_HISTOGRAM_LONG_TIMES("Startup.ShowAppListWarmStartFast", elapsed); 46 UMA_HISTOGRAM_LONG_TIMES("Startup.ShowAppListWarmStartFast", elapsed);
47 else 47 else
48 UMA_HISTOGRAM_LONG_TIMES("Startup.ShowAppListWarmStart", elapsed); 48 UMA_HISTOGRAM_LONG_TIMES("Startup.ShowAppListWarmStart", elapsed);
49 } else { 49 } else {
50 // base::CurrentProcessInfo::CreationTime() is only defined on win/mac.
51 #if defined(OS_WIN) || defined(OS_MACOSX)
52 UMA_HISTOGRAM_LONG_TIMES( 50 UMA_HISTOGRAM_LONG_TIMES(
53 "Startup.ShowAppListColdStart", 51 "Startup.ShowAppListColdStart",
54 base::Time::Now() - *base::CurrentProcessInfo::CreationTime()); 52 base::Time::Now() - *base::CurrentProcessInfo::CreationTime());
55 #endif
56 } 53 }
57 } 54 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698