diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-30 01:46:38 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-30 01:46:38 +0000 |
commit | 2def95c5f0b6ecb34cb39a3733c3517bfe115194 (patch) | |
tree | 3fcad90f42ffd66cf2e63bb7dca6decc35e41bef /remoting/host/chromoting_host_context.cc | |
parent | f86c7c6de61f397307633c1f798c1ec42df2e84c (diff) | |
download | chromium_src-2def95c5f0b6ecb34cb39a3733c3517bfe115194.zip chromium_src-2def95c5f0b6ecb34cb39a3733c3517bfe115194.tar.gz chromium_src-2def95c5f0b6ecb34cb39a3733c3517bfe115194.tar.bz2 |
Fix memory leaks in remoting_unittests.
After 94766 CHormotingHostTest started leaking Task objects.
Fixing it by using base::Closure instead.
BUG=None
TEST=No valgrind errors remoting_unittests
Review URL: http://codereview.chromium.org/7540008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94813 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/chromoting_host_context.cc')
-rw-r--r-- | remoting/host/chromoting_host_context.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/remoting/host/chromoting_host_context.cc b/remoting/host/chromoting_host_context.cc index 66276a3..603a8e9 100644 --- a/remoting/host/chromoting_host_context.cc +++ b/remoting/host/chromoting_host_context.cc @@ -57,20 +57,20 @@ MessageLoop* ChromotingHostContext::desktop_message_loop() { return desktop_thread_.message_loop(); } -void ChromotingHostContext::SetUITaskPostFunction(const base::Callback<void( - const tracked_objects::Location& from_here, Task* task)>& poster) { +void ChromotingHostContext::SetUITaskPostFunction( + const UIThreadPostTaskFunction& poster) { ui_poster_ = poster; ui_main_thread_id_ = base::PlatformThread::CurrentId(); } void ChromotingHostContext::PostTaskToUIThread( - const tracked_objects::Location& from_here, Task* task) { + const tracked_objects::Location& from_here, const base::Closure& task) { ui_poster_.Run(from_here, task); } void ChromotingHostContext::PostDelayedTaskToUIThread( const tracked_objects::Location& from_here, - Task* task, + const base::Closure& task, int delay_ms) { // Post delayed task on the main thread that will post task on UI // thread. It is safe to use base::Unretained() here because |