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

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

Issue 1151563005: Revert of NTP Zombie Code Slayer Part IV: Most Visited (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/ntp_resource_cache.h ('k') | chrome/browser/ui/webui/ntp/thumbnail_source.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 7b064222a082ab74c7afc3aad86ec645870a4c61..1a27e73e57e2d0b1eaf7bde63d4c8d4ac4fbe277 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -165,6 +165,7 @@
NTPResourceCache::NTPResourceCache(Profile* profile)
: profile_(profile), is_swipe_tracking_from_scroll_events_enabled_(false),
should_show_apps_page_(NewTabUI::ShouldShowApps()),
+ should_show_most_visited_page_(true),
should_show_other_devices_menu_(true) {
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
content::Source<ThemeService>(
@@ -413,16 +414,27 @@
load_time_data.SetBoolean("hasattribution",
ThemeServiceFactory::GetForProfile(profile_)->HasCustomImage(
IDR_THEME_NTP_ATTRIBUTION));
+ load_time_data.SetBoolean("showMostvisited", should_show_most_visited_page_);
load_time_data.SetBoolean("showAppLauncherPromo",
ShouldShowAppLauncherPromo());
load_time_data.SetString("title",
l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE));
+ load_time_data.SetString("mostvisited",
+ l10n_util::GetStringUTF16(IDS_NEW_TAB_MOST_VISITED));
+ load_time_data.SetString("restoreThumbnailsShort",
+ l10n_util::GetStringUTF16(IDS_NEW_TAB_RESTORE_THUMBNAILS_SHORT_LINK));
load_time_data.SetString("webStoreTitle",
l10n_util::GetStringUTF16(IDS_EXTENSION_WEB_STORE_TITLE));
load_time_data.SetString("webStoreTitleShort",
l10n_util::GetStringUTF16(IDS_EXTENSION_WEB_STORE_TITLE_SHORT));
load_time_data.SetString("attributionintro",
l10n_util::GetStringUTF16(IDS_NEW_TAB_ATTRIBUTION_INTRO));
+ load_time_data.SetString("thumbnailremovednotification",
+ l10n_util::GetStringUTF16(IDS_NEW_TAB_THUMBNAIL_REMOVED_NOTIFICATION));
+ load_time_data.SetString("undothumbnailremove",
+ l10n_util::GetStringUTF16(IDS_NEW_TAB_UNDO_THUMBNAIL_REMOVE));
+ load_time_data.SetString("removethumbnailtooltip",
+ l10n_util::GetStringUTF16(IDS_NEW_TAB_REMOVE_THUMBNAIL_TOOLTIP));
load_time_data.SetString("appuninstall",
l10n_util::GetStringUTF16(IDS_EXTENSIONS_UNINSTALL));
load_time_data.SetString("appoptions",
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_resource_cache.h ('k') | chrome/browser/ui/webui/ntp/thumbnail_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698