Fix cert DB usage in PolicyCertVerifier test.
[chromium-blink-merge.git] / ui / app_list / app_list_switches.cc
blobd0c77d276fe08e0e0d88ee7bc49aa5639d5ee8cd
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
3 // found in the LICENSE file.
5 #include "ui/app_list/app_list_switches.h"
7 #include "base/command_line.h"
9 namespace app_list {
10 namespace switches {
12 // If set, the app info context menu item is not available in the app list UI.
13 const char kDisableAppInfo[] = "disable-app-list-app-info";
15 // Disables syncing of the app list independent of extensions.
16 const char kDisableSyncAppList[] = "disable-sync-app-list";
18 // If set, the app list will be centered and wide instead of tall.
19 const char kEnableCenteredAppList[] = "enable-centered-app-list";
21 // If set, Drive apps of the user shows side-by-side with Chrome apps.
22 const char kEnableDriveAppsInAppList[] = "enable-drive-apps-in-app-list";
24 // If set, the experimental app list will be used. Implies
25 // --enable-centered-app-list.
26 const char kEnableExperimentalAppList[] = "enable-experimental-app-list";
28 // Enables syncing of the app list independent of extensions.
29 const char kEnableSyncAppList[] = "enable-sync-app-list";
31 bool IsAppListSyncEnabled() {
32 #if defined(TOOLKIT_VIEWS)
33 return !CommandLine::ForCurrentProcess()->HasSwitch(kDisableSyncAppList);
34 #else
35 return CommandLine::ForCurrentProcess()->HasSwitch(kEnableSyncAppList);
36 #endif
39 bool IsFolderUIEnabled() {
40 #if !defined(TOOLKIT_VIEWS)
41 return false; // Folder UI not implemented for Cocoa.
42 #endif
43 // Folder UI is available only when AppList sync is enabled, and should
44 // not be disabled separately.
45 return IsAppListSyncEnabled();
48 bool IsVoiceSearchEnabled() {
49 // Speech recognition in AppList is only for ChromeOS right now.
50 #if defined(OS_CHROMEOS)
51 return true;
52 #else
53 return false;
54 #endif
57 bool IsAppInfoEnabled() {
58 #if defined(TOOLKIT_VIEWS)
59 return !CommandLine::ForCurrentProcess()->HasSwitch(kDisableAppInfo);
60 #else
61 return false;
62 #endif
65 bool IsExperimentalAppListEnabled() {
66 return CommandLine::ForCurrentProcess()->HasSwitch(
67 kEnableExperimentalAppList);
70 bool IsCenteredAppListEnabled() {
71 return CommandLine::ForCurrentProcess()->HasSwitch(kEnableCenteredAppList) ||
72 IsExperimentalAppListEnabled();
75 bool IsDriveAppsInAppListEnabled() {
76 return CommandLine::ForCurrentProcess()->HasSwitch(kEnableDriveAppsInAppList);
79 } // namespace switches
80 } // namespace app_list