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/process_info.h" | 10 #include "base/process/process_info.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // static | 84 // static |
85 void AppListService::RegisterPrefs(PrefRegistrySimple* registry) { | 85 void AppListService::RegisterPrefs(PrefRegistrySimple* registry) { |
86 registry->RegisterInt64Pref(prefs::kLastAppListLaunchPing, 0); | 86 registry->RegisterInt64Pref(prefs::kLastAppListLaunchPing, 0); |
87 registry->RegisterIntegerPref(prefs::kAppListLaunchCount, 0); | 87 registry->RegisterIntegerPref(prefs::kAppListLaunchCount, 0); |
88 registry->RegisterInt64Pref(prefs::kLastAppListAppLaunchPing, 0); | 88 registry->RegisterInt64Pref(prefs::kLastAppListAppLaunchPing, 0); |
89 registry->RegisterIntegerPref(prefs::kAppListAppLaunchCount, 0); | 89 registry->RegisterIntegerPref(prefs::kAppListAppLaunchCount, 0); |
90 registry->RegisterStringPref(prefs::kAppListProfile, std::string()); | 90 registry->RegisterStringPref(prefs::kAppListProfile, std::string()); |
91 registry->RegisterBooleanPref(prefs::kRestartWithAppList, false); | 91 registry->RegisterBooleanPref(prefs::kRestartWithAppList, false); |
92 registry->RegisterBooleanPref(prefs::kAppLauncherIsEnabled, false); | 92 registry->RegisterBooleanPref(prefs::kAppLauncherIsEnabled, false); |
93 registry->RegisterBooleanPref(prefs::kAppLauncherHasBeenEnabled, false); | 93 registry->RegisterBooleanPref(prefs::kAppLauncherHasBeenEnabled, false); |
| 94 registry->RegisterIntegerPref(prefs::kAppListEnableMethod, |
| 95 ENABLE_NOT_RECORDED); |
| 96 registry->RegisterInt64Pref(prefs::kAppListEnableTime, 0); |
94 | 97 |
95 #if defined(OS_MACOSX) | 98 #if defined(OS_MACOSX) |
96 registry->RegisterIntegerPref(prefs::kAppLauncherShortcutVersion, 0); | 99 registry->RegisterIntegerPref(prefs::kAppLauncherShortcutVersion, 0); |
97 #endif | 100 #endif |
98 | 101 |
99 // Identifies whether we should show the app launcher promo or not. | 102 // Identifies whether we should show the app launcher promo or not. |
100 // Note that a field trial also controls the showing, so the promo won't show | 103 // Note that a field trial also controls the showing, so the promo won't show |
101 // unless the pref is set AND the field trial is set to a proper group. | 104 // unless the pref is set AND the field trial is set to a proper group. |
102 registry->RegisterBooleanPref(prefs::kShowAppLauncherPromo, true); | 105 registry->RegisterBooleanPref(prefs::kShowAppLauncherPromo, true); |
103 } | 106 } |
(...skipping 15 matching lines...) Expand all Loading... |
119 break; | 122 break; |
120 case WARM_START_FAST: | 123 case WARM_START_FAST: |
121 UMA_HISTOGRAM_LONG_TIMES("Startup.ShowAppListWarmStartFast", elapsed); | 124 UMA_HISTOGRAM_LONG_TIMES("Startup.ShowAppListWarmStartFast", elapsed); |
122 break; | 125 break; |
123 } | 126 } |
124 | 127 |
125 RecordStartupInfo(startup, start_time); | 128 RecordStartupInfo(startup, start_time); |
126 Get(chrome::HOST_DESKTOP_TYPE_NATIVE)->SetAppListNextPaintCallback( | 129 Get(chrome::HOST_DESKTOP_TYPE_NATIVE)->SetAppListNextPaintCallback( |
127 RecordFirstPaintTiming); | 130 RecordFirstPaintTiming); |
128 } | 131 } |
OLD | NEW |