diff options
Diffstat (limited to 'chrome/browser/dom_ui/options/options_ui.cc')
-rw-r--r-- | chrome/browser/dom_ui/options/options_ui.cc | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/chrome/browser/dom_ui/options/options_ui.cc b/chrome/browser/dom_ui/options/options_ui.cc index 24e83d9..2ae3772 100644 --- a/chrome/browser/dom_ui/options/options_ui.cc +++ b/chrome/browser/dom_ui/options/options_ui.cc @@ -193,15 +193,25 @@ OptionsUI::OptionsUI(TabContents* contents) new OptionsUIHTMLSource(localized_strings); // Set up the chrome://settings/ source. - contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); + BrowserThread::PostTask( + BrowserThread::IO, FROM_HERE, + NewRunnableMethod( + ChromeURLDataManager::GetInstance(), + &ChromeURLDataManager::AddDataSource, + make_scoped_refptr(html_source))); // Set up the chrome://theme/ source. - WebUIThemeSource* theme = new WebUIThemeSource(contents->profile()); - contents->profile()->GetChromeURLDataManager()->AddDataSource(theme); + WebUIThemeSource* theme = new WebUIThemeSource(GetProfile()); + BrowserThread::PostTask( + BrowserThread::IO, FROM_HERE, + NewRunnableMethod( + ChromeURLDataManager::GetInstance(), + &ChromeURLDataManager::AddDataSource, + make_scoped_refptr(theme))); // Initialize the chrome://about/ source in case the user clicks the credits // link. - InitializeAboutDataSource(contents->profile()); + InitializeAboutDataSource(); } OptionsUI::~OptionsUI() { |