diff options
author | csilv@chromium.org <csilv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-17 21:24:37 +0000 |
---|---|---|
committer | csilv@chromium.org <csilv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-17 21:24:37 +0000 |
commit | 6198f7989a5140e9f3b7717138c2f25527ffa8f2 (patch) | |
tree | 0e722c6d0e3bf4022d5a6b5d79ba2b63ac543e68 /chrome/browser/task_manager | |
parent | da910fe462244967d8a23e6b9e5532a293800d48 (diff) | |
download | chromium_src-6198f7989a5140e9f3b7717138c2f25527ffa8f2.zip chromium_src-6198f7989a5140e9f3b7717138c2f25527ffa8f2.tar.gz chromium_src-6198f7989a5140e9f3b7717138c2f25527ffa8f2.tar.bz2 |
base::Bind migrations in chrome/browser
BUG=none
Review URL: http://codereview.chromium.org/8513020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110561 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/task_manager')
-rw-r--r-- | chrome/browser/task_manager/task_manager.cc | 19 | ||||
-rw-r--r-- | chrome/browser/task_manager/task_manager_resource_providers.cc | 12 |
2 files changed, 15 insertions, 16 deletions
diff --git a/chrome/browser/task_manager/task_manager.cc b/chrome/browser/task_manager/task_manager.cc index d5ddaf41..9557877 100644 --- a/chrome/browser/task_manager/task_manager.cc +++ b/chrome/browser/task_manager/task_manager.cc @@ -4,6 +4,7 @@ #include "chrome/browser/task_manager/task_manager.h" +#include "base/bind.h" #include "base/compiler_specific.h" #include "base/i18n/number_formatting.h" #include "base/i18n/rtl.h" @@ -612,8 +613,8 @@ void TaskManagerModel::StartUpdating() { // If update_state_ is STOPPING, it means a task is still pending. Setting // it to TASK_PENDING ensures the tasks keep being posted (by Refresh()). if (update_state_ == IDLE) { - MessageLoop::current()->PostDelayedTask(FROM_HERE, - NewRunnableMethod(this, &TaskManagerModel::Refresh), + MessageLoop::current()->PostDelayedTask( + FROM_HERE, base::Bind(&TaskManagerModel::Refresh, this), kUpdateTimeMs); } update_state_ = TASK_PENDING; @@ -882,9 +883,8 @@ void TaskManagerModel::Refresh() { } // Schedule the next update. - MessageLoop::current()->PostDelayedTask(FROM_HERE, - NewRunnableMethod(this, &TaskManagerModel::Refresh), - kUpdateTimeMs); + MessageLoop::current()->PostDelayedTask( + FROM_HERE, base::Bind(&TaskManagerModel::Refresh, this), kUpdateTimeMs); } int64 TaskManagerModel::GetNetworkUsageForResource( @@ -969,12 +969,9 @@ void TaskManagerModel::NotifyBytesRead(const net::URLRequest& request, // This happens in the IO thread, post it to the UI thread. BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, - NewRunnableMethod( - this, - &TaskManagerModel::BytesRead, - BytesReadParam(origin_pid, - render_process_host_child_id, - routing_id, byte_count))); + base::Bind(&TaskManagerModel::BytesRead, this, + BytesReadParam(origin_pid, render_process_host_child_id, + routing_id, byte_count))); } bool TaskManagerModel::GetProcessMetricsForRow( diff --git a/chrome/browser/task_manager/task_manager_resource_providers.cc b/chrome/browser/task_manager/task_manager_resource_providers.cc index c9d57e0..24f1644 100644 --- a/chrome/browser/task_manager/task_manager_resource_providers.cc +++ b/chrome/browser/task_manager/task_manager_resource_providers.cc @@ -7,6 +7,7 @@ #include <string> #include "base/basictypes.h" +#include "base/bind.h" #include "base/file_version_info.h" #include "base/i18n/rtl.h" #include "base/process_util.h" @@ -920,9 +921,9 @@ void TaskManagerChildProcessResourceProvider::StartUpdating() { // Get the existing child processes. BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, - NewRunnableMethod( - this, - &TaskManagerChildProcessResourceProvider::RetrieveChildProcessInfo)); + base::Bind( + &TaskManagerChildProcessResourceProvider::RetrieveChildProcessInfo, + this)); } void TaskManagerChildProcessResourceProvider::StopUpdating() { @@ -1032,8 +1033,9 @@ void TaskManagerChildProcessResourceProvider::RetrieveChildProcessInfo() { // processes. BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, - NewRunnableMethod(this, - &TaskManagerChildProcessResourceProvider::ChildProcessInfoRetreived)); + base::Bind( + &TaskManagerChildProcessResourceProvider::ChildProcessInfoRetreived, + this)); } // This is called on the UI thread. |