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

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

Issue 6354016: Fix layout glitches in NTP. Also, lots of naming cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment Created 9 years, 11 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
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 164a23529fe66c299b6b23f89f6472015bb1ff2f..d8f240372be279815a5854967ad080bdf8adad90 100644
--- a/chrome/browser/dom_ui/shown_sections_handler.cc
+++ b/chrome/browser/dom_ui/shown_sections_handler.cc
@@ -25,8 +25,8 @@ namespace {
// TODO(aa): Needs to be updated to match newest NTP - http://crbug.com/57440
void NotifySectionDisabled(int new_mode, int old_mode, Profile *profile) {
// If the oldmode HAD either thumbs or lists visible.
- bool old_had_it = (old_mode & THUMB) && !(old_mode & MINIMIZED_THUMB);
- bool new_has_it = (new_mode & THUMB) && !(new_mode & MINIMIZED_THUMB);
+ bool old_had_it = (old_mode & THUMB) && !(old_mode & MENU_THUMB);
+ bool new_has_it = (new_mode & THUMB) && !(new_mode & MENU_THUMB);
if (old_had_it && !new_has_it) {
UserMetrics::RecordAction(
@@ -106,7 +106,7 @@ void ShownSectionsHandler::RegisterUserPrefs(PrefService* pref_service) {
#if defined(OS_CHROMEOS)
// Default to have expanded APPS and all other secions are minimized.
pref_service->RegisterIntegerPref(prefs::kNTPShownSections,
- APPS | MINIMIZED_THUMB | MINIMIZED_RECENT);
+ APPS | MENU_THUMB | MENU_RECENT);
#else
pref_service->RegisterIntegerPref(prefs::kNTPShownSections, THUMB);
#endif
@@ -147,8 +147,8 @@ void ShownSectionsHandler::OnExtensionInstalled(PrefService* prefs,
if (extension->is_app()) {
int mode = prefs->GetInteger(prefs::kNTPShownSections);
- // De-minimize the apps section.
- mode &= ~MINIMIZED_APPS;
+ // De-menu-mode the apps section.
+ mode &= ~MENU_APPS;
// Hide any open sections.
mode &= ~ALL_SECTIONS_MASK;

Powered by Google App Engine
This is Rietveld 408576698