Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "apps/prefs.h" | |
| 6 | |
| 7 #include "apps/app_launcher.h" | |
| 8 #include "chrome/browser/prefs/pref_service.h" | |
|
tfarina
2013/02/01 15:11:24
so is this allowed for now?
I think we need to ad
benwells
2013/02/08 07:18:00
It would be great to get rid of the dependency to
| |
| 9 | |
| 10 namespace apps { | |
| 11 | |
| 12 namespace prefs { | |
| 13 | |
| 14 // Local state caching knowledge of whether the app launcher is installed. | |
| 15 const char kAppLauncherIsEnabled[] = | |
| 16 "apps.app_launcher.should_show_apps_page"; | |
| 17 | |
| 18 } // namespace prefs | |
| 19 | |
| 20 void RegisterPrefs(PrefServiceSimple* pref_service) { | |
| 21 // This pref is a cache of the value from the registry the last time it was | |
| 22 // checked. | |
| 23 // | |
| 24 // During the pref initialization, if it is impossible to synchronously | |
| 25 // determine whether the app launcher is enabled, assume it is disabled. | |
| 26 // Anything that needs to know the absolute truth should call | |
| 27 // GetIsAppLauncherEnabled(). | |
| 28 pref_service->RegisterBooleanPref(prefs::kAppLauncherIsEnabled, | |
| 29 MaybeIsAppLauncherEnabled()); | |
| 30 } | |
| 31 | |
| 32 } // namespace apps | |
| OLD | NEW |