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

Unified Diff: chrome/browser/android/provider/chrome_browser_provider.cc

Issue 815983002: Topsites become keyedService based. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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/provider/chrome_browser_provider.cc
diff --git a/chrome/browser/android/provider/chrome_browser_provider.cc b/chrome/browser/android/provider/chrome_browser_provider.cc
index 681aa8bd05c02bbd3a3677518cd6d83da88f4a65..66b6253d9afd08cc7eedf446edd5cd2c229a7b28 100644
--- a/chrome/browser/android/provider/chrome_browser_provider.cc
+++ b/chrome/browser/android/provider/chrome_browser_provider.cc
@@ -28,7 +28,8 @@
#include "chrome/browser/favicon/favicon_service_factory.h"
#include "chrome/browser/history/android/sqlite_cursor.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/top_sites.h"
+#include "chrome/browser/history/top_sites_provider.h"
+#include "chrome/browser/history/top_sites_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
@@ -1165,7 +1166,7 @@ ChromeBrowserProvider::ChromeBrowserProvider(JNIEnv* env, jobject obj)
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
profile_ = g_browser_process->profile_manager()->GetLastUsedProfile();
bookmark_model_ = BookmarkModelFactory::GetForProfile(profile_);
- top_sites_ = profile_->GetTopSites();
+ top_sites_provider_ = TopSitesServiceFactory::GetForProfile(profile_);
favicon_service_ = FaviconServiceFactory::GetForProfile(
profile_, Profile::EXPLICIT_ACCESS),
service_.reset(new AndroidHistoryProviderService(profile_));
@@ -1574,8 +1575,8 @@ ScopedJavaLocalRef<jbyteArray> ChromeBrowserProvider::GetThumbnail(
// GetPageThumbnail is synchronous and can be called from any thread.
scoped_refptr<base::RefCountedMemory> thumbnail;
- if (top_sites_)
- top_sites_->GetPageThumbnail(url, false, &thumbnail);
+ if (top_sites_provider_)
+ top_sites_provider_->GetPageThumbnail(url, false, &thumbnail);
if (!thumbnail.get() || !thumbnail->front()) {
return ScopedJavaLocalRef<jbyteArray>();

Powered by Google App Engine
This is Rietveld 408576698