| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 registry->RegisterStringPref(prefs::kAppListProfile, std::string()); | 146 registry->RegisterStringPref(prefs::kAppListProfile, std::string()); |
| 147 registry->RegisterBooleanPref(prefs::kAppLauncherHasBeenEnabled, false); | 147 registry->RegisterBooleanPref(prefs::kAppLauncherHasBeenEnabled, false); |
| 148 registry->RegisterIntegerPref(prefs::kAppListEnableMethod, | 148 registry->RegisterIntegerPref(prefs::kAppListEnableMethod, |
| 149 ENABLE_NOT_RECORDED); | 149 ENABLE_NOT_RECORDED); |
| 150 registry->RegisterInt64Pref(prefs::kAppListEnableTime, 0); | 150 registry->RegisterInt64Pref(prefs::kAppListEnableTime, 0); |
| 151 registry->RegisterInt64Pref(prefs::kAppListLastLaunchTime, 0); | 151 registry->RegisterInt64Pref(prefs::kAppListLastLaunchTime, 0); |
| 152 | 152 |
| 153 #if defined(OS_MACOSX) | 153 #if defined(OS_MACOSX) |
| 154 registry->RegisterIntegerPref(prefs::kAppLauncherShortcutVersion, 0); | 154 registry->RegisterIntegerPref(prefs::kAppLauncherShortcutVersion, 0); |
| 155 #endif | 155 #endif |
| 156 | |
| 157 // Identifies whether we should show the app launcher promo or not. This | |
| 158 // becomes false when the user dismisses the promo. | |
| 159 registry->RegisterBooleanPref(prefs::kShowAppLauncherPromo, true); | |
| 160 } | 156 } |
| 161 | 157 |
| 162 // static | 158 // static |
| 163 bool AppListService::HandleLaunchCommandLine( | 159 bool AppListService::HandleLaunchCommandLine( |
| 164 const base::CommandLine& command_line, | 160 const base::CommandLine& command_line, |
| 165 Profile* launch_profile) { | 161 Profile* launch_profile) { |
| 166 InitAll(launch_profile, launch_profile->GetPath()); | 162 InitAll(launch_profile, launch_profile->GetPath()); |
| 167 if (!command_line.HasSwitch(switches::kShowAppList)) | 163 if (!command_line.HasSwitch(switches::kShowAppList)) |
| 168 return false; | 164 return false; |
| 169 | 165 |
| 170 AppListService* service = Get(); | 166 AppListService* service = Get(); |
| 171 DCHECK(service); | 167 DCHECK(service); |
| 172 RecordStartupInfo(service, command_line, launch_profile); | 168 RecordStartupInfo(service, command_line, launch_profile); |
| 173 service->ShowForProfile(launch_profile); | 169 service->ShowForProfile(launch_profile); |
| 174 return true; | 170 return true; |
| 175 } | 171 } |
| OLD | NEW |