| 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); | |
| 97 | 94 |
| 98 #if defined(OS_MACOSX) | 95 #if defined(OS_MACOSX) |
| 99 registry->RegisterIntegerPref(prefs::kAppLauncherShortcutVersion, 0); | 96 registry->RegisterIntegerPref(prefs::kAppLauncherShortcutVersion, 0); |
| 100 #endif | 97 #endif |
| 101 | 98 |
| 102 // Identifies whether we should show the app launcher promo or not. | 99 // Identifies whether we should show the app launcher promo or not. |
| 103 // Note that a field trial also controls the showing, so the promo won't show | 100 // Note that a field trial also controls the showing, so the promo won't show |
| 104 // unless the pref is set AND the field trial is set to a proper group. | 101 // unless the pref is set AND the field trial is set to a proper group. |
| 105 registry->RegisterBooleanPref(prefs::kShowAppLauncherPromo, true); | 102 registry->RegisterBooleanPref(prefs::kShowAppLauncherPromo, true); |
| 106 } | 103 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 122 break; | 119 break; |
| 123 case WARM_START_FAST: | 120 case WARM_START_FAST: |
| 124 UMA_HISTOGRAM_LONG_TIMES("Startup.ShowAppListWarmStartFast", elapsed); | 121 UMA_HISTOGRAM_LONG_TIMES("Startup.ShowAppListWarmStartFast", elapsed); |
| 125 break; | 122 break; |
| 126 } | 123 } |
| 127 | 124 |
| 128 RecordStartupInfo(startup, start_time); | 125 RecordStartupInfo(startup, start_time); |
| 129 Get(chrome::HOST_DESKTOP_TYPE_NATIVE)->SetAppListNextPaintCallback( | 126 Get(chrome::HOST_DESKTOP_TYPE_NATIVE)->SetAppListNextPaintCallback( |
| 130 RecordFirstPaintTiming); | 127 RecordFirstPaintTiming); |
| 131 } | 128 } |
| OLD | NEW |