This source file includes following definitions.
- IsAppListSyncEnabled
- IsFolderUIEnabled
- IsVoiceSearchEnabled
- IsAppInfoEnabled
- IsExperimentalAppListEnabled
- IsExperimentalAppListPositionEnabled
#include "ui/app_list/app_list_switches.h"
#include "base/command_line.h"
namespace app_list {
namespace switches {
const char kDisableSyncAppList[] = "disable-sync-app-list";
const char kDisableVoiceSearch[] = "disable-app-list-voice-search";
const char kEnableAppInfo[] = "enable-app-list-app-info";
const char kEnableExperimentalAppList[] = "enable-experimental-app-list";
const char kEnableExperimentalAppListPosition[] =
"enable-experimental-app-list-position";
const char kEnableSyncAppList[] = "enable-sync-app-list";
bool IsAppListSyncEnabled() {
#if defined(OS_CHROMEOS)
return !CommandLine::ForCurrentProcess()->HasSwitch(kDisableSyncAppList);
#else
return CommandLine::ForCurrentProcess()->HasSwitch(kEnableSyncAppList);
#endif
}
bool IsFolderUIEnabled() {
#if defined(OS_MACOSX)
return false;
#endif
return IsAppListSyncEnabled();
}
bool IsVoiceSearchEnabled() {
#if defined(OS_CHROMEOS)
return !CommandLine::ForCurrentProcess()->HasSwitch(kDisableVoiceSearch);
#else
return false;
#endif
}
bool IsAppInfoEnabled() {
return CommandLine::ForCurrentProcess()->HasSwitch(kEnableAppInfo);
}
bool IsExperimentalAppListEnabled() {
return CommandLine::ForCurrentProcess()->HasSwitch(
kEnableExperimentalAppList);
}
bool IsExperimentalAppListPositionEnabled() {
return CommandLine::ForCurrentProcess()->HasSwitch(
kEnableExperimentalAppListPosition) ||
IsExperimentalAppListEnabled();
}
}
}