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

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

Issue 3292003: De-suck the NTP a bit more: (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Fix unit test Created 10 years, 4 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.h ('k') | chrome/browser/dom_ui/shown_sections_handler_unittest.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
diff --git a/chrome/browser/dom_ui/shown_sections_handler.cc b/chrome/browser/dom_ui/shown_sections_handler.cc
index deb4d014af9e526da3dd7f60caf6e0ab81181b0c..44cc8b24e32dc6eaf22c6ef4e346261e6b90736a 100644
--- a/chrome/browser/dom_ui/shown_sections_handler.cc
+++ b/chrome/browser/dom_ui/shown_sections_handler.cc
@@ -110,10 +110,17 @@ void ShownSectionsHandler::MigrateUserPrefs(PrefService* pref_service,
bool changed = false;
int shown_sections = pref_service->GetInteger(prefs::kNTPShownSections);
- if (old_pref_version < 3) {
- // At version 3, we added apps. To bring attention to the feature, we start
- // it off as the only expanded section.
- shown_sections = APPS;
+ if (old_pref_version < 1) {
+ // TIPS was used in early builds of the NNTP but since it was removed before
+ // Chrome 3.0 we want to ensure that it is shown by default.
+ shown_sections |= TIPS | SYNC;
+ changed = true;
+ }
+
+ if (old_pref_version < 2) {
+ // LIST is no longer used. Change to THUMB.
+ shown_sections &= ~LIST;
+ shown_sections |= THUMB;
changed = true;
}
« no previous file with comments | « chrome/browser/dom_ui/new_tab_ui.h ('k') | chrome/browser/dom_ui/shown_sections_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698