| 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 547f347c0765c69c40ec2592059af75f0e350acd..a731c10bc8fb3fec0218d0ef3393f4b65b27bb53 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_factory.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,9 @@ 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();
|
| + ChromeURLDataManagerFactory::GetForProfile(profile)->
|
| + AddDataSource(html_source);
|
|
|
| pref_change_registrar_.Init(GetProfile()->GetPrefs());
|
| pref_change_registrar_.Add(prefs::kShowBookmarkBar, this);
|
| @@ -260,7 +263,7 @@ void NewTabUI::InitializeCSSCaches() {
|
| #if defined(ENABLE_THEMES)
|
| Profile* profile = GetProfile();
|
| ThemeSource* theme = new ThemeSource(profile);
|
| - profile->GetChromeURLDataManager()->AddDataSource(theme);
|
| + ChromeURLDataManagerFactory::GetForProfile(profile)->AddDataSource(theme);
|
| #endif
|
| }
|
|
|
|
|