summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authortapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-22 10:17:50 +0000
committertapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-22 10:17:50 +0000
commit17033b27c05b0f1df9a10df2173b24afd5ae3dbb (patch)
treeee60f48826b860161085df7947e68d20741ae239 /apps
parent2efd1371582610c8d7af89f2a5c9447b550bf36c (diff)
downloadchromium_src-17033b27c05b0f1df9a10df2173b24afd5ae3dbb.zip
chromium_src-17033b27c05b0f1df9a10df2173b24afd5ae3dbb.tar.gz
chromium_src-17033b27c05b0f1df9a10df2173b24afd5ae3dbb.tar.bz2
Allow OSX App Launcher to be enabled via the webstore.
This implements IsAppLauncherEnabled for OSX, so the webstore can query it, and removes the empty override for EnableAppList on OSX, so that enabling it will do something. The old, mac-only flag --enable-app-list-shim is still supported, but only checked if the app list has not been enabled via the webstore. BUG=138633, 261363 TEST=No functional changes on Win/CrOS. On Mac, running the initial Chrome process with --enable-app-list will create (or recreate) an app list shortcut, popup a finder window. Installing something from the webstore will then popup the app launcher instead of highlighting the app on the NTP when installed. Review URL: https://chromiumcodereview.appspot.com/18736003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212861 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r--apps/app_launcher.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/apps/app_launcher.cc b/apps/app_launcher.cc
index 3f00b47..4e1f379 100644
--- a/apps/app_launcher.cc
+++ b/apps/app_launcher.cc
@@ -20,20 +20,19 @@
namespace apps {
bool IsAppLauncherEnabled() {
-#if defined(USE_ASH) && !defined(OS_WIN)
- return true;
-#elif !defined(OS_WIN)
+#if !defined(ENABLE_APP_LIST)
return false;
-#else
-#if defined(USE_ASH)
+
+#elif defined(OS_CHROMEOS)
+ return true;
+
+#else // defined(ENABLE_APP_LIST) && !defined(OS_CHROMEOS)
if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH)
return true;
-#endif
+
PrefService* prefs = g_browser_process->local_state();
// In some tests, the prefs aren't initialised.
- if (!prefs)
- return false;
- return prefs->GetBoolean(prefs::kAppLauncherHasBeenEnabled);
+ return prefs && prefs->GetBoolean(prefs::kAppLauncherHasBeenEnabled);
#endif
}