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

Side by Side Diff: ui/app_list/app_list_switches.cc

Issue 1861233003: Prepare for building with enable_app_list=0 on Desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: drop patchset dependency, rebase to master Created 4 years, 7 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 "ui/app_list/app_list_switches.h" 5 #include "ui/app_list/app_list_switches.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 namespace app_list { 10 namespace app_list {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // Enable/disable the new "blended" algorithm in app_list::Mixer. This is just 43 // Enable/disable the new "blended" algorithm in app_list::Mixer. This is just
44 // forcing the AppListMixer/Blended field trial. 44 // forcing the AppListMixer/Blended field trial.
45 const char kEnableNewAppListMixer[] = "enable-new-app-list-mixer"; 45 const char kEnableNewAppListMixer[] = "enable-new-app-list-mixer";
46 const char kDisableNewAppListMixer[] = "disable-new-app-list-mixer"; 46 const char kDisableNewAppListMixer[] = "disable-new-app-list-mixer";
47 47
48 // If set, the app list will forget it has been installed on startup. Note this 48 // If set, the app list will forget it has been installed on startup. Note this
49 // doesn't prevent the app list from running, it just makes Chrome think the app 49 // doesn't prevent the app list from running, it just makes Chrome think the app
50 // list hasn't been enabled (as in kEnableAppList) yet. 50 // list hasn't been enabled (as in kEnableAppList) yet.
51 const char kResetAppListInstallState[] = "reset-app-list-install-state"; 51 const char kResetAppListInstallState[] = "reset-app-list-install-state";
52 52
53 #if defined(OS_MACOSX)
54 // Enables use of the toolkit-views app list on Mac.
55 const char kEnableMacViewsAppList[] = "enable-mac-views-app-list";
56 #endif
57
58 bool IsAppListSyncEnabled() { 53 bool IsAppListSyncEnabled() {
59 #if defined(OS_MACOSX) 54 #if defined(OS_MACOSX)
60 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnableSyncAppList)) 55 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnableSyncAppList))
61 return true; 56 return true;
62 57
63 if (!IsMacViewsAppListEnabled()) 58 return false;
Matt Giuca 2016/05/03 07:31:16 Removing the enable-mac-views-app-list switch is a
tapted 2016/05/04 09:55:43 OK you twisted my arm :p
Matt Giuca 2016/05/05 00:26:30 Ever so slightly...
64 return false;
65 #endif 59 #endif
66 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 60 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
67 kDisableSyncAppList); 61 kDisableSyncAppList);
68 } 62 }
69 63
70 bool IsFolderUIEnabled() { 64 bool IsFolderUIEnabled() {
71 // Folder UI is available only when AppList sync is enabled, and should 65 // Folder UI is available only when AppList sync is enabled, and should
72 // not be disabled separately. 66 // not be disabled separately.
73 return IsAppListSyncEnabled(); 67 return IsAppListSyncEnabled();
74 } 68 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 120 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
127 kDisableDriveSearchInChromeLauncher)) 121 kDisableDriveSearchInChromeLauncher))
128 return false; 122 return false;
129 123
130 return true; 124 return true;
131 #else 125 #else
132 return false; 126 return false;
133 #endif 127 #endif
134 } 128 }
135 129
136 #if defined(OS_MACOSX)
137 bool IsMacViewsAppListEnabled() {
138 #if defined(TOOLKIT_VIEWS)
139 return base::CommandLine::ForCurrentProcess()->HasSwitch(
140 kEnableMacViewsAppList);
141 #endif
142 return false;
143 }
144 #endif // defined(OS_MACOSX)
145
146 } // namespace switches 130 } // namespace switches
147 } // namespace app_list 131 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698