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

Unified Diff: chrome/browser/ui/webui/ntp/most_visited_handler.cc

Issue 10196004: Changed ChromeURLDataManager to a ProfileKeyedService and made a Factory for it. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed style nit Created 8 years, 8 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/ui/webui/ntp/most_visited_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/most_visited_handler.cc b/chrome/browser/ui/webui/ntp/most_visited_handler.cc
index 81f08f30b0685e75a60afd27ab00efd33a82f595..114390f5421869af77ee6911b151003880e6caed 100644
--- a/chrome/browser/ui/webui/ntp/most_visited_handler.cc
+++ b/chrome/browser/ui/webui/ntp/most_visited_handler.cc
@@ -22,7 +22,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
+#include "chrome/browser/ui/webui/chrome_url_data_manager_factory.h"
#include "chrome/browser/ui/webui/favicon_source.h"
#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
#include "chrome/browser/ui/webui/ntp/thumbnail_source.h"
@@ -52,10 +52,11 @@ void MostVisitedHandler::RegisterMessages() {
Profile* profile = Profile::FromWebUI(web_ui());
// Set up our sources for thumbnail and favicon data.
ThumbnailSource* thumbnail_src = new ThumbnailSource(profile);
- profile->GetChromeURLDataManager()->AddDataSource(thumbnail_src);
+ ChromeURLDataManagerFactory::GetForProfile(profile)->
+ AddDataSource(thumbnail_src);
- profile->GetChromeURLDataManager()->AddDataSource(
- new FaviconSource(profile, FaviconSource::FAVICON));
+ ChromeURLDataManagerFactory::GetForProfile(profile)->
+ AddDataSource(new FaviconSource(profile, FaviconSource::FAVICON));
history::TopSites* ts = profile->GetTopSites();
if (ts) {

Powered by Google App Engine
This is Rietveld 408576698