Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: chrome/browser/ui/app_list/app_list_util.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/prefs/pref_service.h"
8 #include "build/build_config.h" 7 #include "build/build_config.h"
9 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/ui/host_desktop.h" 9 #include "chrome/browser/ui/host_desktop.h"
11 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
11 #include "components/prefs/pref_service.h"
12 12
13 bool IsAppLauncherEnabled() { 13 bool IsAppLauncherEnabled() {
14 #if !defined(ENABLE_APP_LIST) 14 #if !defined(ENABLE_APP_LIST)
15 return false; 15 return false;
16 16
17 #elif defined(OS_CHROMEOS) 17 #elif defined(OS_CHROMEOS)
18 return true; 18 return true;
19 19
20 #else // defined(ENABLE_APP_LIST) && !defined(OS_CHROMEOS) 20 #else // defined(ENABLE_APP_LIST) && !defined(OS_CHROMEOS)
21 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) 21 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH)
(...skipping 10 matching lines...) Expand all
32 PrefService* local_state = g_browser_process->local_state(); 32 PrefService* local_state = g_browser_process->local_state();
33 // In some tests, the prefs aren't initialised. 33 // In some tests, the prefs aren't initialised.
34 if (!local_state) 34 if (!local_state)
35 return false; 35 return false;
36 return !IsAppLauncherEnabled() && 36 return !IsAppLauncherEnabled() &&
37 local_state->GetBoolean(prefs::kShowAppLauncherPromo); 37 local_state->GetBoolean(prefs::kShowAppLauncherPromo);
38 #else 38 #else
39 return false; 39 return false;
40 #endif 40 #endif
41 } // namespace apps 41 } // namespace apps
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_syncable_service_factory.cc ('k') | chrome/browser/ui/app_list/app_list_view_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698