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

Unified Diff: chrome/browser/android/dev_tools_manager_delegate_android.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/dev_tools_manager_delegate_android.cc
diff --git a/chrome/browser/android/dev_tools_manager_delegate_android.cc b/chrome/browser/android/dev_tools_manager_delegate_android.cc
index a5da5f74ec51df9259b4fd8bc5d11238fc6543ce..35cd738f882f545f071c47fc99783472e6eb4965 100644
--- a/chrome/browser/android/dev_tools_manager_delegate_android.cc
+++ b/chrome/browser/android/dev_tools_manager_delegate_android.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/android/tab_android.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/history/top_sites.h"
+#include "chrome/browser/history/top_sites_service_factory.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/android/tab_model/tab_model.h"
#include "chrome/browser/ui/android/tab_model/tab_model_list.h"
@@ -337,8 +338,9 @@ void DevToolsManagerDelegateAndroid::EnumerateTargets(TargetCallback callback) {
std::string DevToolsManagerDelegateAndroid::GetPageThumbnailData(
const GURL& url) {
Profile* profile = ProfileManager::GetLastUsedProfile()->GetOriginalProfile();
- history::TopSites* top_sites = profile->GetTopSites();
- if (top_sites) {
+ scoped_refptr<history::TopSites> top_sites =
+ TopSitesServiceFactory::GetForProfile(profile);
+ if (top_sites.get()) {
sdefresne 2014/12/29 09:48:14 nit: "if (top_sites)" should work, here and everyw
Jitu( very slow this week) 2014/12/30 10:09:02 Done.
Bernhard Bauer 2015/01/06 11:10:30 This is still not fixed in a *lot* of other places
Bernhard Bauer 2015/01/08 10:22:04 Still not fixed in some places. These are really n
scoped_refptr<base::RefCountedMemory> data;
if (top_sites->GetPageThumbnail(url, false, &data))
return std::string(data->front_as<char>(), data->size());
« no previous file with comments | « no previous file | chrome/browser/android/dev_tools_server.cc » ('j') | chrome/browser/android/most_visited_sites.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698