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

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

Issue 24632002: Implementing chrome://thumbnails page to view URLs in TopSites and cached thumbnails. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Trying to fix Linux compile by reordering initializing order of weak_ptr_factory_. Created 7 years, 3 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: chrome/browser/ui/webui/ntp/most_visited_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/most_visited_handler.cc b/chrome/browser/ui/webui/ntp/most_visited_handler.cc
index 63f1e22ccaa863a96ffa307da43a35e66ee44121..abbfc89340b7284fcac0406d9ae3b202f2e7c04e 100644
--- a/chrome/browser/ui/webui/ntp/most_visited_handler.cc
+++ b/chrome/browser/ui/webui/ntp/most_visited_handler.cc
@@ -32,6 +32,7 @@
#include "chrome/browser/ui/webui/favicon_source.h"
#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
#include "chrome/browser/ui/webui/ntp/ntp_stats.h"
+#include "chrome/browser/ui/webui/ntp/thumbnail_list_source.h"
#include "chrome/browser/ui/webui/ntp/thumbnail_source.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
@@ -77,11 +78,11 @@ MostVisitedHandler::~MostVisitedHandler() {
void MostVisitedHandler::RegisterMessages() {
Profile* profile = Profile::FromWebUI(web_ui());
// Set up our sources for thumbnail and favicon data.
- ThumbnailSource* thumbnail_src_exact = new ThumbnailSource(profile, false);
- content::URLDataSource::Add(profile, thumbnail_src_exact);
+ content::URLDataSource::Add(profile, new ThumbnailSource(profile, false));
+ content::URLDataSource::Add(profile, new ThumbnailSource(profile, true));
- ThumbnailSource* thumbnail_src_prefix = new ThumbnailSource(profile, true);
- content::URLDataSource::Add(profile, thumbnail_src_prefix);
+ // 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.
« no previous file with comments | « chrome/browser/thumbnails/thumbnail_service_impl.cc ('k') | chrome/browser/ui/webui/ntp/thumbnail_list_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698