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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 // static | 159 // static |
160 bool AppListService::HandleLaunchCommandLine( | 160 bool AppListService::HandleLaunchCommandLine( |
161 const base::CommandLine& command_line, | 161 const base::CommandLine& command_line, |
162 Profile* launch_profile) { | 162 Profile* launch_profile) { |
163 InitAll(launch_profile, launch_profile->GetPath()); | 163 InitAll(launch_profile, launch_profile->GetPath()); |
164 if (!command_line.HasSwitch(switches::kShowAppList)) | 164 if (!command_line.HasSwitch(switches::kShowAppList)) |
165 return false; | 165 return false; |
166 | 166 |
167 // The --show-app-list switch is used for shortcuts on the native desktop. | 167 // The --show-app-list switch is used for shortcuts on the native desktop. |
168 AppListService* service = Get(chrome::HOST_DESKTOP_TYPE_NATIVE); | 168 AppListService* service = Get(ui::HOST_DESKTOP_TYPE_NATIVE); |
169 DCHECK(service); | 169 DCHECK(service); |
170 RecordStartupInfo(service, command_line, launch_profile); | 170 RecordStartupInfo(service, command_line, launch_profile); |
171 service->ShowForProfile(launch_profile); | 171 service->ShowForProfile(launch_profile); |
172 return true; | 172 return true; |
173 } | 173 } |
OLD | NEW |