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

Unified Diff: chrome/browser/ui/webui/ntp/suggestions_page_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/suggestions_page_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc b/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc
index ee86fd525eaeab4960362048f160166177cc6031..e8f76295ce560f25b10b0ddf1e60c2827ac29902 100644
--- a/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc
+++ b/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc
@@ -21,7 +21,7 @@
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/history/visit_filter.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"
@@ -89,10 +89,10 @@ SuggestionsHandler::~SuggestionsHandler() {
void SuggestionsHandler::RegisterMessages() {
Profile* profile = Profile::FromWebUI(web_ui());
// Set up our sources for thumbnail and favicon data.
- profile->GetChromeURLDataManager()->AddDataSource(
- new ThumbnailSource(profile));
- profile->GetChromeURLDataManager()->AddDataSource(
- new FaviconSource(profile, FaviconSource::FAVICON));
+ ChromeURLDataManagerFactory::GetForProfile(profile)->
+ AddDataSource(new ThumbnailSource(profile));
+ ChromeURLDataManagerFactory::GetForProfile(profile)->
+ AddDataSource(new FaviconSource(profile, FaviconSource::FAVICON));
// TODO(georgey) change the source of the web-sites to provide our data.
// Initial commit uses top sites as a data source.

Powered by Google App Engine
This is Rietveld 408576698