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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_ui.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: Made ChromeURLDataManager's destructor virtual 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/new_tab_ui.cc
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
index aeae7ba401dffceb10029e0676bdeb78387e26c3..fc4532901318bb461e3f6afe873b0aa62c71c980 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -27,6 +27,7 @@
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/metrics_handler.h"
#include "chrome/browser/ui/webui/ntp/favicon_webui_handler.h"
#include "chrome/browser/ui/webui/ntp/foreign_session_handler.h"
@@ -159,7 +160,8 @@ NewTabUI::NewTabUI(content::WebUI* web_ui)
// ChromeURLDataManager assumes the ownership of the html_source and in some
// tests immediately deletes it, so html_source should not be accessed after
// this call.
- GetProfile()->GetChromeURLDataManager()->AddDataSource(html_source);
+ Profile* profile = GetProfile();
+ ChromeURLDataManager::AddDataSource(profile, html_source);
pref_change_registrar_.Init(GetProfile()->GetPrefs());
pref_change_registrar_.Add(prefs::kShowBookmarkBar, this);
@@ -260,7 +262,7 @@ void NewTabUI::InitializeCSSCaches() {
#if defined(ENABLE_THEMES)
Profile* profile = GetProfile();
ThemeSource* theme = new ThemeSource(profile);
- profile->GetChromeURLDataManager()->AddDataSource(theme);
+ ChromeURLDataManager::AddDataSource(profile, theme);
#endif
}
« no previous file with comments | « chrome/browser/ui/webui/ntp/most_visited_handler.cc ('k') | chrome/browser/ui/webui/ntp/suggestions_page_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698