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

Unified Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache.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/new_tab_ui.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index dee96c22717d1af81e01631239c9f9ab0e240fde..330abd805cb7c87faeac71cd072b3064e3f68850 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/ntp/new_tab_page_handler.h"
+#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
#include "chrome/browser/ui/webui/ntp/shown_sections_handler.h"
#include "chrome/browser/ui/webui/sync_setup_handler.h"
#include "chrome/browser/web_resource/promo_resource_service.h"
@@ -421,7 +422,7 @@ void NTPResourceCache::CreateNewTabHTML() {
// consistent across builds, supporting the union of all NTP front-ends
// for simplicity.
std::string full_html;
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewTabPage4)) {
+ if (NewTabUI::Ntp4Enabled()) {
base::StringPiece new_tab_html(ResourceBundle::GetSharedInstance().
GetRawDataResource(IDR_NEW_TAB_4_HTML));
full_html = jstemplate_builder::GetI18nTemplateHtml(new_tab_html,
@@ -570,9 +571,8 @@ void NTPResourceCache::CreateNewTabCSS() {
subst.push_back(SkColorToRGBComponents(color_section_border)); // $22
// Get our template.
- int ntp_css_resource_id =
- CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewTabPage4) ?
- IDR_NEW_TAB_4_THEME_CSS : IDR_NEW_TAB_THEME_CSS;
+ int ntp_css_resource_id = NewTabUI::Ntp4Enabled() ?
+ IDR_NEW_TAB_4_THEME_CSS : IDR_NEW_TAB_THEME_CSS;
static const base::StringPiece new_tab_theme_css(
ResourceBundle::GetSharedInstance().GetRawDataResource(
ntp_css_resource_id));
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698