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

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

Issue 2337893003: Pass PopularSites ownership to MostVisitedSites. (Closed)
Patch Set: header Created 4 years, 3 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_bridge.h ('k') | components/ntp_tiles/most_visited_sites.h » ('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_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 7c0676f30d28ac3eb89531dda8ec52e4e06c726b..b1285a580227e7da8c1dbb9815eb0cc5198fe1f0 100644
--- a/chrome/browser/android/ntp/most_visited_sites_bridge.cc
+++ b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
@@ -12,6 +12,7 @@
#include "base/android/scoped_java_ref.h"
#include "base/bind.h"
#include "base/callback.h"
+#include "base/memory/ptr_util.h"
#include "chrome/browser/android/ntp/popular_sites.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/history/top_sites_factory.h"
@@ -158,17 +159,17 @@ void MostVisitedSitesBridge::JavaObserver::OnPopularURLsAvailable(
MostVisitedSitesBridge::MostVisitedSitesBridge(Profile* profile)
: supervisor_(profile),
- popular_sites_(BrowserThread::GetBlockingPool(),
- profile->GetPrefs(),
- TemplateURLServiceFactory::GetForProfile(profile),
- g_browser_process->variations_service(),
- profile->GetRequestContext(),
- ChromePopularSites::GetDirectory(),
- base::Bind(safe_json::SafeJsonParser::Parse)),
most_visited_(profile->GetPrefs(),
TopSitesFactory::GetForProfile(profile),
SuggestionsServiceFactory::GetForProfile(profile),
- &popular_sites_,
+ base::MakeUnique<ntp_tiles::PopularSites>(
+ BrowserThread::GetBlockingPool(),
+ profile->GetPrefs(),
+ TemplateURLServiceFactory::GetForProfile(profile),
+ g_browser_process->variations_service(),
+ profile->GetRequestContext(),
+ ChromePopularSites::GetDirectory(),
+ base::Bind(safe_json::SafeJsonParser::Parse)),
&supervisor_) {
// Register the thumbnails debugging page.
// TODO(sfiera): find thumbnails a home. They don't belong here.
« no previous file with comments | « chrome/browser/android/ntp/most_visited_sites_bridge.h ('k') | components/ntp_tiles/most_visited_sites.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698