Chromium Code Reviews| Index: apps/prefs.cc |
| diff --git a/apps/prefs.cc b/apps/prefs.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c098c044236338f7ec72087b6818f2a3b6b1bfd6 |
| --- /dev/null |
| +++ b/apps/prefs.cc |
| @@ -0,0 +1,32 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "apps/prefs.h" |
| + |
| +#include "apps/app_launcher.h" |
| +#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
|
| + |
| +namespace apps { |
| + |
| +namespace prefs { |
| + |
| +// Local state caching knowledge of whether the app launcher is installed. |
| +const char kAppLauncherIsEnabled[] = |
| + "apps.app_launcher.should_show_apps_page"; |
| + |
| +} // namespace prefs |
| + |
| +void RegisterPrefs(PrefServiceSimple* pref_service) { |
| + // This pref is a cache of the value from the registry the last time it was |
| + // checked. |
| + // |
| + // During the pref initialization, if it is impossible to synchronously |
| + // determine whether the app launcher is enabled, assume it is disabled. |
| + // Anything that needs to know the absolute truth should call |
| + // GetIsAppLauncherEnabled(). |
| + pref_service->RegisterBooleanPref(prefs::kAppLauncherIsEnabled, |
| + MaybeIsAppLauncherEnabled()); |
| +} |
| + |
| +} // namespace apps |