| Index: chrome/browser/dom_ui/new_tab_ui.cc
|
| ===================================================================
|
| --- chrome/browser/dom_ui/new_tab_ui.cc (revision 74293)
|
| +++ chrome/browser/dom_ui/new_tab_ui.cc (working copy)
|
| @@ -332,7 +332,12 @@
|
| InitializeCSSCaches();
|
| NewTabHTMLSource* html_source =
|
| new NewTabHTMLSource(GetProfile()->GetOriginalProfile());
|
| - contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source);
|
| + BrowserThread::PostTask(
|
| + BrowserThread::IO, FROM_HERE,
|
| + NewRunnableMethod(
|
| + ChromeURLDataManager::GetInstance(),
|
| + &ChromeURLDataManager::AddDataSource,
|
| + make_scoped_refptr(html_source)));
|
|
|
| // Listen for theme installation.
|
| registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
|
| @@ -417,9 +422,13 @@
|
| }
|
|
|
| void NewTabUI::InitializeCSSCaches() {
|
| - Profile* profile = GetProfile();
|
| - WebUIThemeSource* theme = new WebUIThemeSource(profile);
|
| - profile->GetChromeURLDataManager()->AddDataSource(theme);
|
| + WebUIThemeSource* theme = new WebUIThemeSource(GetProfile());
|
| + BrowserThread::PostTask(
|
| + BrowserThread::IO, FROM_HERE,
|
| + NewRunnableMethod(
|
| + ChromeURLDataManager::GetInstance(),
|
| + &ChromeURLDataManager::AddDataSource,
|
| + make_scoped_refptr(theme)));
|
| }
|
|
|
| // static
|
|
|