diff options
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r-- | chrome/browser/chromeos/dom_ui/imageburner_ui.cc | 7 | ||||
-rw-r--r-- | chrome/browser/chromeos/dom_ui/keyboard_overlay_ui.cc | 9 | ||||
-rw-r--r-- | chrome/browser/chromeos/dom_ui/login/login_ui.cc | 9 | ||||
-rw-r--r-- | chrome/browser/chromeos/dom_ui/menu_ui.cc | 16 | ||||
-rw-r--r-- | chrome/browser/chromeos/dom_ui/mobile_setup_ui.cc | 7 | ||||
-rw-r--r-- | chrome/browser/chromeos/dom_ui/network_menu_ui.cc | 10 | ||||
-rw-r--r-- | chrome/browser/chromeos/dom_ui/register_page_ui.cc | 8 | ||||
-rw-r--r-- | chrome/browser/chromeos/dom_ui/system_info_ui.cc | 9 |
8 files changed, 20 insertions, 55 deletions
diff --git a/chrome/browser/chromeos/dom_ui/imageburner_ui.cc b/chrome/browser/chromeos/dom_ui/imageburner_ui.cc index 758b47b..8aaa576 100644 --- a/chrome/browser/chromeos/dom_ui/imageburner_ui.cc +++ b/chrome/browser/chromeos/dom_ui/imageburner_ui.cc @@ -649,10 +649,5 @@ ImageBurnUI::ImageBurnUI(TabContents* contents) : DOMUI(contents) { ImageBurnHandler* handler = new ImageBurnHandler(contents); AddMessageHandler((handler)->Attach(this)); ImageBurnUIHTMLSource* html_source = new ImageBurnUIHTMLSource(); - BrowserThread::PostTask( - BrowserThread::IO, FROM_HERE, - NewRunnableMethod( - ChromeURLDataManager::GetInstance(), - &ChromeURLDataManager::AddDataSource, - make_scoped_refptr(html_source))); + contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); } diff --git a/chrome/browser/chromeos/dom_ui/keyboard_overlay_ui.cc b/chrome/browser/chromeos/dom_ui/keyboard_overlay_ui.cc index 8f41996..fb84ee2 100644 --- a/chrome/browser/chromeos/dom_ui/keyboard_overlay_ui.cc +++ b/chrome/browser/chromeos/dom_ui/keyboard_overlay_ui.cc @@ -12,6 +12,8 @@ #include "chrome/browser/chromeos/cros/input_method_library.h" #include "chrome/browser/chromeos/input_method/input_method_util.h" #include "chrome/browser/dom_ui/chrome_url_data_manager.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/jstemplate_builder.h" #include "chrome/common/url_constants.h" #include "grit/browser_resources.h" @@ -294,10 +296,5 @@ KeyboardOverlayUI::KeyboardOverlayUI(TabContents* contents) KeyboardOverlayUIHTMLSource* html_source = new KeyboardOverlayUIHTMLSource(); // Set up the chrome://keyboardoverlay/ source. - BrowserThread::PostTask( - BrowserThread::IO, FROM_HERE, - NewRunnableMethod( - ChromeURLDataManager::GetInstance(), - &ChromeURLDataManager::AddDataSource, - make_scoped_refptr(html_source))); + contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); } diff --git a/chrome/browser/chromeos/dom_ui/login/login_ui.cc b/chrome/browser/chromeos/dom_ui/login/login_ui.cc index 845bf4b..a1ba4e0 100644 --- a/chrome/browser/chromeos/dom_ui/login/login_ui.cc +++ b/chrome/browser/chromeos/dom_ui/login/login_ui.cc @@ -14,6 +14,8 @@ #include "chrome/browser/chromeos/dom_ui/login/authenticator_facade_cros.h" #include "chrome/browser/chromeos/dom_ui/login/login_ui.h" #include "chrome/browser/chromeos/dom_ui/login/login_ui_helpers.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_window.h" #include "chrome/common/url_constants.h" @@ -155,12 +157,7 @@ LoginUI::LoginUI(TabContents* contents) LoginUIHTMLSource* html_source = new LoginUIHTMLSource(MessageLoop::current()); - BrowserThread::PostTask( - BrowserThread::IO, FROM_HERE, - NewRunnableMethod( - ChromeURLDataManager::GetInstance(), - &ChromeURLDataManager::AddDataSource, - make_scoped_refptr(html_source))); + contents->profile->GetChromeURLDataManager()->AddDataSource(html_source); } } // namespace chromeos diff --git a/chrome/browser/chromeos/dom_ui/menu_ui.cc b/chrome/browser/chromeos/dom_ui/menu_ui.cc index 741961a..04adde5 100644 --- a/chrome/browser/chromeos/dom_ui/menu_ui.cc +++ b/chrome/browser/chromeos/dom_ui/menu_ui.cc @@ -20,6 +20,7 @@ #include "chrome/browser/chromeos/views/native_menu_webui.h" #include "chrome/browser/chromeos/views/webui_menu_widget.h" #include "chrome/browser/dom_ui/web_ui_util.h" +#include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/tab_contents/tab_contents_delegate.h" #include "chrome/common/url_constants.h" @@ -531,12 +532,8 @@ MenuUI::MenuUI(TabContents* contents) : DOMUI(contents) { MenuHandler* handler = new MenuHandler(); AddMessageHandler((handler)->Attach(this)); - BrowserThread::PostTask( - BrowserThread::IO, FROM_HERE, - NewRunnableMethod( - ChromeURLDataManager::GetInstance(), - &ChromeURLDataManager::AddDataSource, - make_scoped_refptr(CreateDataSource()))); + contents->profile()->GetChromeURLDataManager()->AddDataSource( + CreateDataSource()); } MenuUI::MenuUI(TabContents* contents, ChromeURLDataManager::DataSource* source) @@ -544,12 +541,7 @@ MenuUI::MenuUI(TabContents* contents, ChromeURLDataManager::DataSource* source) MenuHandler* handler = new MenuHandler(); AddMessageHandler((handler)->Attach(this)); - BrowserThread::PostTask( - BrowserThread::IO, FROM_HERE, - NewRunnableMethod( - ChromeURLDataManager::GetInstance(), - &ChromeURLDataManager::AddDataSource, - make_scoped_refptr(source))); + contents->profile()->GetChromeURLDataManager()->AddDataSource(source); } void MenuUI::ModelUpdated(const ui::MenuModel* model) { diff --git a/chrome/browser/chromeos/dom_ui/mobile_setup_ui.cc b/chrome/browser/chromeos/dom_ui/mobile_setup_ui.cc index a6365cd..ac3688e 100644 --- a/chrome/browser/chromeos/dom_ui/mobile_setup_ui.cc +++ b/chrome/browser/chromeos/dom_ui/mobile_setup_ui.cc @@ -1323,10 +1323,5 @@ MobileSetupUI::MobileSetupUI(TabContents* contents) : DOMUI(contents) { new MobileSetupUIHTMLSource(service_path); // Set up the chrome://mobilesetup/ source. - BrowserThread::PostTask( - BrowserThread::IO, FROM_HERE, - NewRunnableMethod( - ChromeURLDataManager::GetInstance(), - &ChromeURLDataManager::AddDataSource, - make_scoped_refptr(html_source))); + contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); } diff --git a/chrome/browser/chromeos/dom_ui/network_menu_ui.cc b/chrome/browser/chromeos/dom_ui/network_menu_ui.cc index cea000d..8e0defd 100644 --- a/chrome/browser/chromeos/dom_ui/network_menu_ui.cc +++ b/chrome/browser/chromeos/dom_ui/network_menu_ui.cc @@ -13,6 +13,7 @@ #include "chrome/browser/chromeos/views/native_menu_webui.h" #include "chrome/browser/chromeos/views/webui_menu_widget.h" #include "chrome/browser/dom_ui/web_ui_theme_source.h" +#include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/url_constants.h" #include "googleurl/src/gurl.h" @@ -117,13 +118,8 @@ NetworkMenuUI::NetworkMenuUI(TabContents* contents) AddMessageHandler((handler)->Attach(this)); // Set up chrome://theme/ source. - WebUIThemeSource* theme = new WebUIThemeSource(GetProfile()); - BrowserThread::PostTask( - BrowserThread::IO, FROM_HERE, - NewRunnableMethod( - ChromeURLDataManager::GetInstance(), - &ChromeURLDataManager::AddDataSource, - make_scoped_refptr(theme))); + WebUIThemeSource* theme = new WebUIThemeSource(contents->profile()); + contents->profile()->GetChromeURLDataManager()->AddDataSource(theme); } bool NetworkMenuUI::ModelAction(const ui::MenuModel* model, diff --git a/chrome/browser/chromeos/dom_ui/register_page_ui.cc b/chrome/browser/chromeos/dom_ui/register_page_ui.cc index 2434c03..f3e4453 100644 --- a/chrome/browser/chromeos/dom_ui/register_page_ui.cc +++ b/chrome/browser/chromeos/dom_ui/register_page_ui.cc @@ -21,6 +21,7 @@ #include "chrome/browser/chromeos/login/wizard_controller.h" #include "chrome/browser/chromeos/version_loader.h" #include "chrome/browser/dom_ui/chrome_url_data_manager.h" +#include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/url_constants.h" #include "googleurl/src/gurl.h" @@ -323,10 +324,5 @@ RegisterPageUI::RegisterPageUI(TabContents* contents) : DOMUI(contents){ RegisterPageUIHTMLSource* html_source = new RegisterPageUIHTMLSource(); // Set up the chrome://register/ source. - BrowserThread::PostTask( - BrowserThread::IO, FROM_HERE, - NewRunnableMethod( - ChromeURLDataManager::GetInstance(), - &ChromeURLDataManager::AddDataSource, - make_scoped_refptr(html_source))); + contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); } diff --git a/chrome/browser/chromeos/dom_ui/system_info_ui.cc b/chrome/browser/chromeos/dom_ui/system_info_ui.cc index 87f01d2..93b8456 100644 --- a/chrome/browser/chromeos/dom_ui/system_info_ui.cc +++ b/chrome/browser/chromeos/dom_ui/system_info_ui.cc @@ -18,6 +18,8 @@ #include "chrome/browser/chromeos/cros/cros_library.h" #include "chrome/browser/chromeos/cros/syslogs_library.h" #include "chrome/browser/dom_ui/chrome_url_data_manager.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/jstemplate_builder.h" #include "chrome/common/url_constants.h" @@ -179,10 +181,5 @@ SystemInfoUI::SystemInfoUI(TabContents* contents) : DOMUI(contents) { SystemInfoUIHTMLSource* html_source = new SystemInfoUIHTMLSource(); // Set up the chrome://system/ source. - BrowserThread::PostTask( - BrowserThread::IO, FROM_HERE, - NewRunnableMethod( - ChromeURLDataManager::GetInstance(), - &ChromeURLDataManager::AddDataSource, - make_scoped_refptr(html_source))); + contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); } |