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

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

Issue 6162006: Changes to default apps promo per ui leads: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments 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
« no previous file with comments | « chrome/browser/dom_ui/shown_sections_handler.h ('k') | chrome/browser/extensions/default_apps.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
diff --git a/chrome/browser/dom_ui/shown_sections_handler.cc b/chrome/browser/dom_ui/shown_sections_handler.cc
index 6a2e3ca1c7e76197bad643a4508bf2813b415036..8d82fa785e7c1537834e0119476201e978b498ae 100644
--- a/chrome/browser/dom_ui/shown_sections_handler.cc
+++ b/chrome/browser/dom_ui/shown_sections_handler.cc
@@ -47,6 +47,15 @@ int ShownSectionsHandler::GetShownSections(PrefService* prefs) {
return prefs->GetInteger(prefs::kNTPShownSections);
}
+// static
+void ShownSectionsHandler::SetShownSection(PrefService* prefs,
+ Section section) {
+ int shown_sections = GetShownSections(prefs);
+ shown_sections &= ~ALL_SECTIONS_MASK;
+ shown_sections |= section;
+ prefs->SetInteger(prefs::kNTPShownSections, shown_sections);
+}
+
ShownSectionsHandler::ShownSectionsHandler(PrefService* pref_service)
: pref_service_(pref_service) {
pref_registrar_.Init(pref_service);
« no previous file with comments | « chrome/browser/dom_ui/shown_sections_handler.h ('k') | chrome/browser/extensions/default_apps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698