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

Unified Diff: chrome/browser/dom_ui/shown_sections_handler.cc

Issue 2206001: Merge 48149 - Relanding 48042.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/408/src/
Patch Set: Created 10 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/dom_ui/new_tab_ui.cc ('k') | chrome/browser/extensions/extension_install_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/shown_sections_handler.cc
===================================================================
--- chrome/browser/dom_ui/shown_sections_handler.cc (revision 48200)
+++ 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);
}
}
« no previous file with comments | « chrome/browser/dom_ui/new_tab_ui.cc ('k') | chrome/browser/extensions/extension_install_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698