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

Side by Side Diff: apps/prefs.cc

Issue 13940006: Remove --show-app-list-shortcut flag and implement new app launcher enable logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 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 "apps/prefs.h" 5 #include "apps/prefs.h"
6 6
7 #include "apps/app_launcher.h" 7 #include "apps/app_launcher.h"
8 #include "apps/pref_names.h" 8 #include "apps/pref_names.h"
9 #include "base/prefs/pref_registry_simple.h" 9 #include "base/prefs/pref_registry_simple.h"
10 10
11 namespace apps { 11 namespace apps {
12 12
13 void RegisterPrefs(PrefRegistrySimple* registry) { 13 void RegisterPrefs(PrefRegistrySimple* registry) {
14 // This pref is a cache of the value from the registry the last time it was 14 // This pref is a cache of the value from the registry the last time it was
15 // checked. 15 // checked.
16 // 16 //
17 // During the pref initialization, if it is impossible to synchronously 17 // During the pref initialization, if it is impossible to synchronously
18 // determine whether the app launcher is enabled, assume it is disabled. 18 // determine whether the app launcher is enabled, assume it is disabled.
19 // Anything that needs to know the absolute truth should call 19 // Anything that needs to know the absolute truth should call
20 // GetIsAppLauncherEnabled(). 20 // GetIsAppLauncherEnabled().
21 registry->RegisterBooleanPref(prefs::kAppLauncherIsEnabled, 21 registry->RegisterBooleanPref(prefs::kAppLauncherIsEnabled,
22 MaybeIsAppLauncherEnabled()); 22 MaybeIsAppLauncherEnabled());
23 #if defined(OS_WIN) 23 #if defined(OS_WIN)
24 registry->RegisterStringPref(prefs::kAppLaunchForMetroRestart, ""); 24 registry->RegisterStringPref(prefs::kAppLaunchForMetroRestart, "");
25 registry->RegisterStringPref(prefs::kAppLaunchForMetroRestartProfile, ""); 25 registry->RegisterStringPref(prefs::kAppLaunchForMetroRestartProfile, "");
26 registry->RegisterBooleanPref(prefs::kAppLauncherHasBeenEnabled, false);
27 registry->RegisterBooleanPref(prefs::kAppLauncherStartMenuShortcutCreated,
28 false);
26 #endif 29 #endif
27 30
28 // Identifies whether we should show the app launcher promo or not. 31 // Identifies whether we should show the app launcher promo or not.
29 // Now that a field trial also controls the showing, so the promo won't show 32 // Now that a field trial also controls the showing, so the promo won't show
30 // unless the pref is set AND the field trial is set to a proper group. 33 // unless the pref is set AND the field trial is set to a proper group.
31 registry->RegisterBooleanPref(prefs::kShowAppLauncherPromo, true); 34 registry->RegisterBooleanPref(prefs::kShowAppLauncherPromo, true);
32 } 35 }
33 36
34 } // namespace apps 37 } // namespace apps
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698