Chromium Code Reviews| Index: apps/app_launcher.cc |
| diff --git a/apps/app_launcher.cc b/apps/app_launcher.cc |
| index 3f00b47a6cbeb8f36b9c72de1047e19cc5a8721d..4e1f379c29a3a326d2e6d4a7d014d0641c82b1c7 100644 |
| --- a/apps/app_launcher.cc |
| +++ b/apps/app_launcher.cc |
| @@ -20,20 +20,19 @@ |
| namespace apps { |
| bool IsAppLauncherEnabled() { |
|
tapted
2013/07/11 06:54:45
note: since /apps is skipped on andriod and iOS, t
benwells
2013/07/12 01:41:48
Why would that be better? It is longer, and couple
tapted
2013/07/12 04:58:27
The alternative makes it possible to #error in cas
|
| -#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) |
|
tapted
2013/07/11 06:54:45
guarding the next two lines doesn't really add any
|
| + |
| +#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 |
| } |