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

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

Issue 1941713002: Remove most of the dependencies on //chrome/... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@g-browser
Patch Set: 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
« no previous file with comments | « no previous file | chrome/browser/android/ntp/most_visited_sites.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/ntp/most_visited_sites.h
diff --git a/chrome/browser/android/ntp/most_visited_sites.h b/chrome/browser/android/ntp/most_visited_sites.h
index f34ebe4c9cc0da8ba7508008e4382a1f37cdea7e..27f7250893e7aec126a2c76e5ecb9d10a7228894 100644
--- a/chrome/browser/android/ntp/most_visited_sites.h
+++ b/chrome/browser/android/ntp/most_visited_sites.h
@@ -25,6 +25,10 @@
#include "components/suggestions/suggestions_service.h"
#include "url/gurl.h"
+namespace history {
+class TopSites;
+}
+
namespace suggestions {
class SuggestionsService;
}
@@ -86,8 +90,14 @@ class MostVisitedSites : public history::TopSitesObserver,
DISALLOW_COPY_AND_ASSIGN(Suggestion);
};
- MostVisitedSites(Profile* profile,
- variations::VariationsService* variations_service);
+ MostVisitedSites(PrefService* prefs,
+ const TemplateURLService* template_url_service,
+ variations::VariationsService* variations_service,
+ net::URLRequestContextGetter* download_context,
+ scoped_refptr<history::TopSites> top_sites,
+ suggestions::SuggestionsService* suggestions,
+ bool is_child_profile,
+ Profile* profile);
~MostVisitedSites() override;
@@ -214,10 +224,20 @@ class MostVisitedSites : public history::TopSitesObserver,
// The profile whose most visited sites will be queried.
Profile* profile_;
+ PrefService* prefs_;
+ const TemplateURLService* template_url_service_;
variations::VariationsService* variations_service_;
+ net::URLRequestContextGetter* download_context_;
scoped_refptr<history::TopSites> top_sites_;
suggestions::SuggestionsService* suggestions_service_;
+ // Children will not be shown popular sites as suggestions.
+ // TODO(sfiera): enable/disable suggestions if the profile is marked or
+ // unmarked as a child profile during the lifetime of the object. For now, it
+ // doesn't matter, because a MostVisitedSites is instantiated for each NTP,
+ // but a longer-lived object would need to update.
+ bool is_child_profile_;
+
Observer* observer_;
// The maximum number of most visited sites to return.
« no previous file with comments | « no previous file | chrome/browser/android/ntp/most_visited_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698