Index: chrome/browser/dom_ui/shown_sections_handler.cc |
=================================================================== |
--- chrome/browser/dom_ui/shown_sections_handler.cc (revision 48045) |
+++ chrome/browser/dom_ui/shown_sections_handler.cc (working copy) |
@@ -12,6 +12,7 @@ |
#include "chrome/browser/pref_service.h" |
#include "chrome/browser/profile.h" |
#include "chrome/common/chrome_switches.h" |
+#include "chrome/common/extensions/extension.h" |
#include "chrome/common/pref_names.h" |
namespace { |
@@ -87,7 +88,7 @@ |
// If we have turned on Apps we want to hide most visited and recent to give |
// more focus to the Apps section. We do not do this in MigrateUserPrefs |
// because the pref version should not depend on command line switches. |
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps) && |
+ if (Extension::AppsAreEnabled() && |
!pref_service->GetBoolean(prefs::kNTPAppLauncherFirstRun)) { |
int sections = pref_service->GetInteger(prefs::kNTPShownSections); |
sections &= ~THUMB; |
@@ -101,7 +102,7 @@ |
void ShownSectionsHandler::RegisterUserPrefs(PrefService* pref_service) { |
pref_service->RegisterIntegerPref(prefs::kNTPShownSections, |
THUMB | RECENT | TIPS | SYNC); |
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps)) { |
+ if (Extension::AppsAreEnabled()) { |
pref_service->RegisterBooleanPref(prefs::kNTPAppLauncherFirstRun, false); |
} |
} |