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

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

Issue 2012473002: Remove NTP dependency on //content/... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
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 b371a1aa9845abf2db91a2da1b71197dd89258e7..5be6febe2082a886e9633477c5b79c3ee1f27efc 100644
--- a/chrome/browser/android/ntp/most_visited_sites_bridge.cc
+++ b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/supervised_user/supervised_user_url_filter.h"
#include "chrome/browser/thumbnails/thumbnail_list_source.h"
#include "components/history/core/browser/top_sites.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/url_data_source.h"
#include "jni/MostVisitedSites_jni.h"
#include "ui/gfx/android/java_bitmap.h"
@@ -34,6 +35,7 @@ using base::android::ConvertJavaStringToUTF8;
using base::android::ScopedJavaGlobalRef;
using base::android::ScopedJavaLocalRef;
using base::android::ToJavaArrayOfStrings;
+using content::BrowserThread;
using suggestions::SuggestionsServiceFactory;
namespace {
@@ -162,14 +164,18 @@ void MostVisitedSitesBridge::JavaObserver::OnPopularURLsAvailable(
MostVisitedSitesBridge::MostVisitedSitesBridge(Profile* profile)
: supervisor_(profile),
- most_visited_(profile->GetPrefs(),
- TemplateURLServiceFactory::GetForProfile(profile),
- g_browser_process->variations_service(),
- profile->GetRequestContext(),
- ChromePopularSites::GetDirectory(),
- TopSitesFactory::GetForProfile(profile),
- SuggestionsServiceFactory::GetForProfile(profile),
- &supervisor_) {
+ most_visited_(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
+ BrowserThread::GetBlockingPool(),
+ profile->GetPrefs(),
+ TemplateURLServiceFactory::GetForProfile(profile),
+ g_browser_process->variations_service(),
+ profile->GetRequestContext(),
+ ChromePopularSites::GetDirectory(),
+ TopSitesFactory::GetForProfile(profile),
+ SuggestionsServiceFactory::GetForProfile(profile),
+ &supervisor_) {
// Register the thumbnails debugging page.
// TODO(sfiera): find thumbnails a home. They don't belong here.
content::URLDataSource::Add(profile, new ThumbnailListSource(profile));

Powered by Google App Engine
This is Rietveld 408576698