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

Unified Diff: chrome/browser/android/ntp/most_visited_sites_bridge.cc

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 | « chrome/browser/android/ntp/most_visited_sites.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/ntp/most_visited_sites_bridge.cc
diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
index 75f6a24f5f969c1f1f7fe14c95488c9d33dda79e..b606586073708ef5dba7298e42882f8918b9e1ab 100644
--- a/chrome/browser/android/ntp/most_visited_sites_bridge.cc
+++ b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
@@ -14,7 +14,14 @@
#include "base/callback.h"
#include "chrome/browser/android/ntp/popular_sites.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/history/top_sites_factory.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_android.h"
+#include "chrome/browser/search/suggestions/suggestions_service_factory.h"
+#include "chrome/browser/search_engines/template_url_service_factory.h"
+#include "chrome/browser/thumbnails/thumbnail_list_source.h"
+#include "components/history/core/browser/top_sites.h"
+#include "content/public/browser/url_data_source.h"
#include "jni/MostVisitedSites_jni.h"
#include "ui/gfx/android/java_bitmap.h"
#include "url/gurl.h"
@@ -24,6 +31,7 @@ using base::android::ConvertJavaStringToUTF8;
using base::android::ScopedJavaGlobalRef;
using base::android::ScopedJavaLocalRef;
using base::android::ToJavaArrayOfStrings;
+using suggestions::SuggestionsServiceFactory;
namespace {
@@ -100,8 +108,18 @@ void MostVisitedSitesBridge::Observer::OnPopularURLsAvailable(
}
MostVisitedSitesBridge::MostVisitedSitesBridge(Profile* profile)
- : most_visited_(profile,
- g_browser_process->variations_service()) {}
+ : most_visited_(profile->GetPrefs(),
+ TemplateURLServiceFactory::GetForProfile(profile),
+ g_browser_process->variations_service(),
+ profile->GetRequestContext(),
+ TopSitesFactory::GetForProfile(profile),
+ SuggestionsServiceFactory::GetForProfile(profile),
+ profile->IsChild(),
+ profile) {
+ // Register the thumbnails debugging page.
+ // TODO(sfiera): find thumbnails a home. They don't belong here.
+ content::URLDataSource::Add(profile, new ThumbnailListSource(profile));
+}
MostVisitedSitesBridge::~MostVisitedSitesBridge() {}
« no previous file with comments | « chrome/browser/android/ntp/most_visited_sites.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698