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

Unified Diff: trunk/src/chrome/browser/ui/webui/ntp/most_visited_handler.cc

Issue 264543002: Revert 267095 "Remove WebUI NTP on Android." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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
Index: trunk/src/chrome/browser/ui/webui/ntp/most_visited_handler.cc
===================================================================
--- trunk/src/chrome/browser/ui/webui/ntp/most_visited_handler.cc (revision 267099)
+++ trunk/src/chrome/browser/ui/webui/ntp/most_visited_handler.cc (working copy)
@@ -84,6 +84,11 @@
// Set up our sources for top-sites data.
content::URLDataSource::Add(profile, new ThumbnailListSource(profile));
+#if defined(OS_ANDROID)
+ // Register chrome://touch-icon as a data source for touch icons or favicons.
+ content::URLDataSource::Add(profile,
+ new FaviconSource(profile, FaviconSource::ANY));
+#endif
// Register chrome://favicon as a data source for favicons.
content::URLDataSource::Add(
profile, new FaviconSource(profile, FaviconSource::FAVICON));
@@ -270,6 +275,9 @@
}
void MostVisitedHandler::MaybeRemovePageValues() {
+// The code below uses APIs not available on Android and the experiment should
+// not run there.
+#if !defined(OS_ANDROID)
if (!history::MostVisitedTilesExperiment::IsDontShowOpenURLsEnabled())
return;
@@ -286,6 +294,7 @@
history::MostVisitedTilesExperiment::RemovePageValuesMatchingOpenTabs(
open_urls,
pages_value_.get());
+#endif
}
// static
« no previous file with comments | « trunk/src/chrome/browser/ui/webui/ntp/android/promo_handler.cc ('k') | trunk/src/chrome/browser/ui/webui/ntp/new_tab_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698