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

Side by Side Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc

Issue 10827075: Use isDiscoveryInNTPEnabled flag instead of isSuggestionsPageEnabled flag to control suggestions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h" 5 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 load_time_data.SetString("otherSessionsEmpty", 363 load_time_data.SetString("otherSessionsEmpty",
364 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_EMPTY)); 364 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_EMPTY));
365 load_time_data.SetString("otherSessionsLearnMoreUrl", 365 load_time_data.SetString("otherSessionsLearnMoreUrl",
366 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_LEARN_MORE_URL)); 366 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_LEARN_MORE_URL));
367 load_time_data.SetString("learnMore", 367 load_time_data.SetString("learnMore",
368 l10n_util::GetStringUTF16(IDS_LEARN_MORE)); 368 l10n_util::GetStringUTF16(IDS_LEARN_MORE));
369 load_time_data.SetString("webStoreLink", 369 load_time_data.SetString("webStoreLink",
370 GetUrlWithLang(GURL(extension_urls::GetWebstoreLaunchURL()))); 370 GetUrlWithLang(GURL(extension_urls::GetWebstoreLaunchURL())));
371 load_time_data.SetString("appInstallHintText", 371 load_time_data.SetString("appInstallHintText",
372 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_INSTALL_HINT_LABEL)); 372 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_INSTALL_HINT_LABEL));
373 load_time_data.SetBoolean("isSuggestionsPageEnabled", 373 load_time_data.SetBoolean("isDiscoveryInNTPEnabled",
374 NewTabUI::IsSuggestionsPageEnabled()); 374 NewTabUI::IsDiscoveryInNTPEnabled());
375 load_time_data.SetBoolean("showApps", NewTabUI::ShouldShowApps()); 375 load_time_data.SetBoolean("showApps", NewTabUI::ShouldShowApps());
376 load_time_data.SetString("collapseSessionMenuItemText", 376 load_time_data.SetString("collapseSessionMenuItemText",
377 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_COLLAPSE_SESSION)); 377 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_COLLAPSE_SESSION));
378 load_time_data.SetString("expandSessionMenuItemText", 378 load_time_data.SetString("expandSessionMenuItemText",
379 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_EXPAND_SESSION)); 379 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_EXPAND_SESSION));
380 load_time_data.SetString("restoreSessionMenuItemText", 380 load_time_data.SetString("restoreSessionMenuItemText",
381 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_OPEN_ALL)); 381 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_OPEN_ALL));
382 load_time_data.SetString("learn_more", 382 load_time_data.SetString("learn_more",
383 l10n_util::GetStringUTF16(IDS_LEARN_MORE)); 383 l10n_util::GetStringUTF16(IDS_LEARN_MORE));
384 384
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 ResourceBundle::GetSharedInstance().GetRawDataResource( 554 ResourceBundle::GetSharedInstance().GetRawDataResource(
555 chrome::search::IsInstantExtendedAPIEnabled(profile_) ? 555 chrome::search::IsInstantExtendedAPIEnabled(profile_) ?
556 IDR_NEW_TAB_SEARCH_THEME_CSS : IDR_NEW_TAB_4_THEME_CSS, 556 IDR_NEW_TAB_SEARCH_THEME_CSS : IDR_NEW_TAB_4_THEME_CSS,
557 ui::SCALE_FACTOR_NONE)); 557 ui::SCALE_FACTOR_NONE));
558 558
559 // Create the string from our template and the replacements. 559 // Create the string from our template and the replacements.
560 std::string css_string; 560 std::string css_string;
561 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); 561 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL);
562 new_tab_css_ = base::RefCountedString::TakeString(&css_string); 562 new_tab_css_ = base::RefCountedString::TakeString(&css_string);
563 } 563 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698