| OLD | NEW |
| 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_info.h" | 10 #include "base/process/process_info.h" |
| 11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
| 14 #include "chrome/common/pref_names.h" | 14 #include "chrome/common/pref_names.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 base::TimeDelta GetTimeFromOriginalProcessStart( | 18 base::TimeDelta GetTimeFromOriginalProcessStart( |
| 19 const CommandLine& command_line) { | 19 const CommandLine& command_line) { |
| 20 std::string start_time_string = | 20 std::string start_time_string = |
| (...skipping 27 matching lines...) Expand all Loading... |
| 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. | 50 // base::CurrentProcessInfo::CreationTime() is only defined on win/mac. |
| 51 #if defined(OS_WIN) || defined(OS_MACOSX) | 51 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 52 UMA_HISTOGRAM_LONG_TIMES( | 52 UMA_HISTOGRAM_LONG_TIMES( |
| 53 "Startup.ShowAppListColdStart", | 53 "Startup.ShowAppListColdStart", |
| 54 base::Time::Now() - *base::CurrentProcessInfo::CreationTime()); | 54 base::Time::Now() - *base::CurrentProcessInfo::CreationTime()); |
| 55 #endif | 55 #endif |
| 56 } | 56 } |
| 57 } | 57 } |
| OLD | NEW |