diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-28 20:31:58 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-28 20:31:58 +0000 |
commit | fae20799882ef797ae9cb5a169c3a60680fa66c2 (patch) | |
tree | aa54776c6e6b1b95fb1ad7737440c82c022eff01 /chrome/browser/dom_ui/filebrowse_ui.cc | |
parent | 419834aa659b728039d8dd398f7156b823f572d8 (diff) | |
download | chromium_src-fae20799882ef797ae9cb5a169c3a60680fa66c2.zip chromium_src-fae20799882ef797ae9cb5a169c3a60680fa66c2.tar.gz chromium_src-fae20799882ef797ae9cb5a169c3a60680fa66c2.tar.bz2 |
First of several patches to get rid of MessageLoop caching now that we have ChromeThread::PostTask.
BUG=25354
Review URL: http://codereview.chromium.org/342020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30383 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/filebrowse_ui.cc')
-rw-r--r-- | chrome/browser/dom_ui/filebrowse_ui.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/chrome/browser/dom_ui/filebrowse_ui.cc b/chrome/browser/dom_ui/filebrowse_ui.cc index eacf872..bcd0aff 100644 --- a/chrome/browser/dom_ui/filebrowse_ui.cc +++ b/chrome/browser/dom_ui/filebrowse_ui.cc @@ -14,7 +14,7 @@ #include "base/time.h" #include "base/values.h" #include "chrome/browser/bookmarks/bookmark_model.h" -#include "chrome/browser/browser_process.h" +#include "chrome/browser/chrome_thread.h" #include "chrome/browser/dom_ui/dom_ui_favicon_source.h" #include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/history/history_types.h" @@ -133,10 +133,12 @@ FileBrowseHandler::~FileBrowseHandler() { DOMMessageHandler* FileBrowseHandler::Attach(DOMUI* dom_ui) { // Create our favicon data source. - g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, - NewRunnableMethod(&chrome_url_data_manager, - &ChromeURLDataManager::AddDataSource, - new DOMUIFavIconSource(dom_ui->GetProfile()))); + ChromeThread::PostTask( + ChromeThread::IO, FROM_HERE, + NewRunnableMethod( + &chrome_url_data_manager, + &ChromeURLDataManager::AddDataSource, + new DOMUIFavIconSource(dom_ui->GetProfile()))); return DOMMessageHandler::Attach(dom_ui); } @@ -248,8 +250,10 @@ FileBrowseUI::FileBrowseUI(TabContents* contents) : DOMUI(contents) { FileBrowseUIHTMLSource* html_source = new FileBrowseUIHTMLSource(); // Set up the chrome://filebrowse/ source. - g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, - NewRunnableMethod(&chrome_url_data_manager, + ChromeThread::PostTask( + ChromeThread::IO, FROM_HERE, + NewRunnableMethod( + &chrome_url_data_manager, &ChromeURLDataManager::AddDataSource, html_source)); } |