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

Unified Diff: chrome/browser/thumbnails/thumbnail_list_source.h

Issue 1021803002: [Thumbnails] Injecting TopSites into ThumbnailListSource. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensured some routines are in the IO thread. Created 5 years, 9 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 | « no previous file | chrome/browser/thumbnails/thumbnail_list_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/thumbnails/thumbnail_list_source.h
diff --git a/chrome/browser/thumbnails/thumbnail_list_source.h b/chrome/browser/thumbnails/thumbnail_list_source.h
index 9421cc60b3fc628b72cf075930bf11e2511dfd36..d587bfd8db7d1ca060b4ef1c29bd709cdecbebb6 100644
--- a/chrome/browser/thumbnails/thumbnail_list_source.h
+++ b/chrome/browser/thumbnails/thumbnail_list_source.h
@@ -19,6 +19,10 @@ namespace base {
class RefCountedMemory;
}
+namespace history {
+class TopSites;
+}
+
namespace thumbnails {
class ThumbnailService;
}
@@ -33,11 +37,13 @@ class ThumbnailListSource : public content::URLDataSource {
// content::URLDataSource implementation.
std::string GetSource() const override;
+ // Called on the IO thread.
void StartDataRequest(
const std::string& path,
int render_process_id,
int render_frame_id,
const content::URLDataSource::GotDataCallback& callback) override;
+
std::string GetMimeType(const std::string& path) const override;
base::MessageLoop* MessageLoopForRequestPath(
const std::string& path) const override;
@@ -47,6 +53,7 @@ class ThumbnailListSource : public content::URLDataSource {
private:
~ThumbnailListSource() override;
+ // Called on the IO thread.
void OnMostVisitedURLsAvailable(
const content::URLDataSource::GotDataCallback& callback,
const history::MostVisitedURLList& mvurl_list);
@@ -54,8 +61,7 @@ class ThumbnailListSource : public content::URLDataSource {
// ThumbnailService.
scoped_refptr<thumbnails::ThumbnailService> thumbnail_service_;
- // Only used when servicing requests on the UI thread.
- Profile* const profile_;
+ scoped_refptr<history::TopSites> top_sites_;
// For callbacks may be run after destruction.
base::WeakPtrFactory<ThumbnailListSource> weak_ptr_factory_;
« no previous file with comments | « no previous file | chrome/browser/thumbnails/thumbnail_list_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698