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

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

Issue 3001003: NTP: Use the store as the last thumbnail in case we have no apps installed.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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/shown_sections_handler.h ('k') | chrome/browser/extensions/extensions_service.h » ('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 52778)
+++ chrome/browser/dom_ui/shown_sections_handler.cc (working copy)
@@ -70,7 +70,6 @@
}
void ShownSectionsHandler::HandleGetShownSections(const Value* value) {
- SetFirstAppLauncherRunPref(pref_service_);
int sections = pref_service_->GetInteger(prefs::kNTPShownSections);
FundamentalValue sections_value(sections);
dom_ui_->CallJavascriptFunction(L"onShownSections", sections_value);
@@ -103,28 +102,9 @@
}
// static
-void ShownSectionsHandler::SetFirstAppLauncherRunPref(
- PrefService* pref_service) {
- // 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 (Extension::AppsAreEnabled() &&
- !pref_service->GetBoolean(prefs::kNTPAppLauncherFirstRun)) {
- int sections = pref_service->GetInteger(prefs::kNTPShownSections);
- sections &= ~THUMB;
- sections &= ~RECENT;
- pref_service->SetInteger(prefs::kNTPShownSections, sections);
- pref_service->SetBoolean(prefs::kNTPAppLauncherFirstRun, true);
- }
-}
-
-// static
void ShownSectionsHandler::RegisterUserPrefs(PrefService* pref_service) {
pref_service->RegisterIntegerPref(prefs::kNTPShownSections,
THUMB | RECENT | TIPS | SYNC);
- if (Extension::AppsAreEnabled()) {
- pref_service->RegisterBooleanPref(prefs::kNTPAppLauncherFirstRun, false);
- }
}
// static
« no previous file with comments | « chrome/browser/dom_ui/shown_sections_handler.h ('k') | chrome/browser/extensions/extensions_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698