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

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

Issue 3455007: Make it possible to hide "most visited" on nnnnnnntp (Closed)
Patch Set: fix revert reasons Created 10 years, 3 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/resources/new_new_tab.css » ('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 e32511d171438d761f10f8114286be6fd6a02bd7..381ea326103edbc6c54653340aa8dbeba2ad88f3 100644
--- a/chrome/browser/dom_ui/shown_sections_handler.cc
+++ b/chrome/browser/dom_ui/shown_sections_handler.cc
@@ -21,10 +21,11 @@ namespace {
// Will cause an UMA notification if the mode of the new tab page
// was changed to hide/show the most visited thumbnails.
+// 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;
- bool new_has_it = new_mode & THUMB;
+ bool old_had_it = (old_mode & THUMB) && !(old_mode & MINIMIZED_THUMB);
+ bool new_has_it = (new_mode & THUMB) && !(new_mode & MINIMIZED_THUMB);
if (old_had_it && !new_has_it) {
UserMetrics::RecordAction(
« no previous file with comments | « chrome/browser/dom_ui/shown_sections_handler.h ('k') | chrome/browser/resources/new_new_tab.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698