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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_page_handler.cc

Issue 7600013: ntp4: make default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit test failures Created 9 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/ui/webui/ntp/most_visited_browsertest.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
index 759ae8208c2fe56b4b9727549d07589f3c32a643..6d68a2be191975df7bd7067cc4bd68b480ad1fcf 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
@@ -4,12 +4,11 @@
#include "chrome/browser/ui/webui/ntp/new_tab_page_handler.h"
-#include "base/command_line.h"
#include "chrome/common/pref_names.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
#include "chrome/common/chrome_notification_types.h"
-#include "chrome/common/chrome_switches.h"
#include "content/common/notification_service.h"
void NewTabPageHandler::RegisterMessages() {
@@ -50,15 +49,13 @@ void NewTabPageHandler::RegisterUserPrefs(PrefService* prefs) {
// static
void NewTabPageHandler::GetLocalizedValues(Profile* profile,
DictionaryValue* values) {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewTabPage4))
+ if (!NewTabUI::Ntp4Enabled())
return;
values->SetInteger("most_visited_page_id", MOST_VISITED_PAGE_ID);
values->SetInteger("apps_page_id", APPS_PAGE_ID);
values->SetInteger("bookmarks_page_id", BOOKMARKS_PAGE_ID);
- // TODO(estade) Should respect shown sections pref (i.e. migrate if it
- // exists).
PrefService* prefs = profile->GetPrefs();
int shown_page = prefs->GetInteger(prefs::kNTPShownPage);
values->SetInteger("shown_page_type", shown_page & ~INDEX_MASK);
« no previous file with comments | « chrome/browser/ui/webui/ntp/most_visited_browsertest.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698