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

Unified Diff: chrome/browser/android/ntp/popular_sites.h

Issue 2012473002: Remove NTP dependency on //content/... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 4 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
Index: chrome/browser/android/ntp/popular_sites.h
diff --git a/chrome/browser/android/ntp/popular_sites.h b/chrome/browser/android/ntp/popular_sites.h
index 9608f5d846acdfdadba3760f32062c702ec71d00..40ac5cd67bcebc126a0942419bd4e6006bd47a50 100644
--- a/chrome/browser/android/ntp/popular_sites.h
+++ b/chrome/browser/android/ntp/popular_sites.h
@@ -64,16 +64,16 @@ class PopularSites : public net::URLFetcherDelegate {
using FinishedCallback = base::Callback<void(bool /* success */)>;
- // Must only be instantiated on the UI thread. When the suggestions have been
- // fetched (from cache or URL) and parsed, invokes |callback|, also on the UI
- // thread.
+ // When the suggestions have been fetched (from cache or URL) and parsed,
+ // invokes |callback|, on the same thread as the caller.
//
// Set |force_download| to enforce re-downloading the suggestions file, even
// if it already exists on disk.
//
// TODO(treib): PopularSites should query the variation params itself instead
// of having them passed in.
- PopularSites(PrefService* prefs,
+ PopularSites(const scoped_refptr<base::SequencedWorkerPool>& blocking_pool,
+ PrefService* prefs,
const TemplateURLService* template_url_service,
variations::VariationsService* variations_service,
net::URLRequestContextGetter* download_context,
@@ -85,7 +85,8 @@ class PopularSites : public net::URLFetcherDelegate {
// This fetches the popular sites from a given url and is only used for
// debugging through the popular-sites-internals page.
- PopularSites(PrefService* prefs,
+ PopularSites(const scoped_refptr<base::SequencedWorkerPool>& blocking_pool,
+ PrefService* prefs,
net::URLRequestContextGetter* download_context,
const base::FilePath& directory,
const GURL& url,
@@ -106,7 +107,8 @@ class PopularSites : public net::URLFetcherDelegate {
user_prefs::PrefRegistrySyncable* user_prefs);
private:
- PopularSites(PrefService* prefs,
+ PopularSites(const scoped_refptr<base::SequencedWorkerPool>& blocking_pool,
+ PrefService* prefs,
net::URLRequestContextGetter* download_context,
const base::FilePath& directory,
const std::string& country,
@@ -147,7 +149,7 @@ class PopularSites : public net::URLFetcherDelegate {
PrefService* prefs_;
net::URLRequestContextGetter* download_context_;
- scoped_refptr<base::TaskRunner> runner_;
+ scoped_refptr<base::TaskRunner> blocking_runner_;
base::WeakPtrFactory<PopularSites> weak_ptr_factory_;
« no previous file with comments | « chrome/browser/android/ntp/most_visited_sites_bridge.cc ('k') | chrome/browser/android/ntp/popular_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698