OLD | NEW |
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 "chrome/browser/ui/app_list/app_list_util.h" | 5 #include "chrome/browser/ui/app_list/app_list_util.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/common/pref_names.h" | 9 #include "chrome/common/pref_names.h" |
10 #include "components/prefs/pref_service.h" | 10 #include "components/prefs/pref_service.h" |
11 | 11 |
12 bool IsAppLauncherEnabled() { | 12 bool IsAppLauncherEnabled() { |
13 #if !defined(ENABLE_APP_LIST) | 13 #if !BUILDFLAG(ENABLE_APP_LIST) |
14 return false; | 14 return false; |
15 #elif defined(OS_CHROMEOS) || defined(USE_ASH) | 15 #elif defined(OS_CHROMEOS) || defined(USE_ASH) |
16 return true; | 16 return true; |
17 #else | 17 #else |
18 PrefService* prefs = g_browser_process->local_state(); | 18 PrefService* prefs = g_browser_process->local_state(); |
19 // In some tests, the prefs aren't initialised. | 19 // In some tests, the prefs aren't initialised. |
20 return prefs && prefs->GetBoolean(prefs::kAppLauncherHasBeenEnabled); | 20 return prefs && prefs->GetBoolean(prefs::kAppLauncherHasBeenEnabled); |
21 #endif | 21 #endif |
22 } | 22 } |
23 | 23 |
24 bool ShouldShowAppLauncherPromo() { | 24 bool ShouldShowAppLauncherPromo() { |
25 // Never promote. TODO(tapted): Delete this function and supporting code. | 25 // Never promote. TODO(tapted): Delete this function and supporting code. |
26 return false; | 26 return false; |
27 } | 27 } |
OLD | NEW |