Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: chrome/browser/ui/app_list/app_list_service.cc

Issue 2143893002: Purge the App Launcher code from Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 27 matching lines...) Expand all
38 if (command_line.HasSwitch(switches::kOriginalProcessStartTime)) { 38 if (command_line.HasSwitch(switches::kOriginalProcessStartTime)) {
39 std::string start_time_string = 39 std::string start_time_string =
40 command_line.GetSwitchValueASCII(switches::kOriginalProcessStartTime); 40 command_line.GetSwitchValueASCII(switches::kOriginalProcessStartTime);
41 int64_t remote_start_time; 41 int64_t remote_start_time;
42 base::StringToInt64(start_time_string, &remote_start_time); 42 base::StringToInt64(start_time_string, &remote_start_time);
43 return base::Time::FromInternalValue(remote_start_time); 43 return base::Time::FromInternalValue(remote_start_time);
44 } 44 }
45 45
46 // base::CurrentProcessInfo::CreationTime() is only defined on some 46 // base::CurrentProcessInfo::CreationTime() is only defined on some
47 // platforms. 47 // platforms.
48 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) 48 #if defined(OS_LINUX)
49 return base::CurrentProcessInfo::CreationTime(); 49 return base::CurrentProcessInfo::CreationTime();
50 #else 50 #else
51 return base::Time(); 51 return base::Time();
52 #endif 52 #endif
53 } 53 }
54 54
55 StartupType GetStartupType(const base::CommandLine& command_line) { 55 StartupType GetStartupType(const base::CommandLine& command_line) {
56 // The presence of kOriginalProcessStartTime implies that another process 56 // The presence of kOriginalProcessStartTime implies that another process
57 // has sent us its command line to handle, ie: we are already running. 57 // has sent us its command line to handle, ie: we are already running.
58 if (command_line.HasSwitch(switches::kOriginalProcessStartTime)) { 58 if (command_line.HasSwitch(switches::kOriginalProcessStartTime)) {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 156
157 // Identifies whether we should show the app launcher promo or not. This 157 // Identifies whether we should show the app launcher promo or not. This
158 // becomes false when the user dismisses the promo. 158 // becomes false when the user dismisses the promo.
159 registry->RegisterBooleanPref(prefs::kShowAppLauncherPromo, true); 159 registry->RegisterBooleanPref(prefs::kShowAppLauncherPromo, true);
160 } 160 }
161 161
162 // static 162 // static
163 bool AppListService::HandleLaunchCommandLine( 163 bool AppListService::HandleLaunchCommandLine(
tapted 2016/07/20 01:15:34 hm - I guess desktop linux will still call this. W
calamity 2016/07/25 02:34:22 Acknowledged.
164 const base::CommandLine& command_line, 164 const base::CommandLine& command_line,
165 Profile* launch_profile) { 165 Profile* launch_profile) {
166 InitAll(launch_profile, launch_profile->GetPath()); 166 InitAll(launch_profile, launch_profile->GetPath());
167 if (!command_line.HasSwitch(switches::kShowAppList)) 167 if (!command_line.HasSwitch(switches::kShowAppList))
168 return false; 168 return false;
169 169
170 AppListService* service = Get(); 170 AppListService* service = Get();
171 DCHECK(service); 171 DCHECK(service);
172 RecordStartupInfo(service, command_line, launch_profile); 172 RecordStartupInfo(service, command_line, launch_profile);
173 service->ShowForProfile(launch_profile); 173 service->ShowForProfile(launch_profile);
174 return true; 174 return true;
175 } 175 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698