summaryrefslogtreecommitdiffstats
path: root/chrome/browser/task_manager.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-03 02:27:01 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-03 02:27:01 +0000
commit0d3dc8e2804b0adc4f572944db027929e2b5af5a (patch)
treeefe4a3ecde226002698017cceba2952b8979a66f /chrome/browser/task_manager.cc
parent8dc291a4dbeed088fbdc36115b250c5f83d3edde (diff)
downloadchromium_src-0d3dc8e2804b0adc4f572944db027929e2b5af5a.zip
chromium_src-0d3dc8e2804b0adc4f572944db027929e2b5af5a.tar.gz
chromium_src-0d3dc8e2804b0adc4f572944db027929e2b5af5a.tar.bz2
Fifth patch in getting rid of caching MessageLoop pointers.
BUG=25354 Review URL: http://codereview.chromium.org/345037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30790 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/task_manager.cc')
-rw-r--r--chrome/browser/task_manager.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/task_manager.cc b/chrome/browser/task_manager.cc
index 3085964..43e2657 100644
--- a/chrome/browser/task_manager.cc
+++ b/chrome/browser/task_manager.cc
@@ -58,8 +58,7 @@ std::wstring FormatStatsSize(const WebKit::WebCache::ResourceTypeStat& stat) {
int TaskManagerModel::goats_teleported_ = 0;
TaskManagerModel::TaskManagerModel(TaskManager* task_manager)
- : ui_loop_(MessageLoop::current()),
- update_state_(IDLE) {
+ : update_state_(IDLE) {
TaskManagerBrowserProcessResourceProvider* browser_provider =
new TaskManagerBrowserProcessResourceProvider(task_manager);
@@ -762,13 +761,14 @@ void TaskManagerModel::OnBytesRead(URLRequestJob* job, int byte_count) {
// This happens in the IO thread, post it to the UI thread.
int origin_child_id =
chrome_browser_net::GetOriginProcessUniqueIDForRequest(job->request());
- ui_loop_->PostTask(FROM_HERE,
- NewRunnableMethod(
- this,
- &TaskManagerModel::BytesRead,
- BytesReadParam(origin_child_id,
- render_process_host_child_id,
- routing_id, byte_count)));
+ ChromeThread::PostTask(
+ ChromeThread::UI, FROM_HERE,
+ NewRunnableMethod(
+ this,
+ &TaskManagerModel::BytesRead,
+ BytesReadParam(origin_child_id,
+ render_process_host_child_id,
+ routing_id, byte_count)));
}
bool TaskManagerModel::GetProcessMetricsForRow(