diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-18 20:44:22 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-18 20:44:22 +0000 |
commit | bb04c4ed964981493b8727cf67257d2ad6e8128b (patch) | |
tree | 0da5525bc43e817bbbd5dc0b691dfd6cdbbe322a /chrome_frame/test/url_request_test.cc | |
parent | 94dde4b7d804f3e8c92fbbaf56251717f9a2cc40 (diff) | |
download | chromium_src-bb04c4ed964981493b8727cf67257d2ad6e8128b.zip chromium_src-bb04c4ed964981493b8727cf67257d2ad6e8128b.tar.gz chromium_src-bb04c4ed964981493b8727cf67257d2ad6e8128b.tar.bz2 |
base::Bind: Convert chrome_frame/.
BUG=none
TEST=none
R=csilv@chromium.org
Review URL: http://codereview.chromium.org/8555001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110744 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test/url_request_test.cc')
-rw-r--r-- | chrome_frame/test/url_request_test.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/chrome_frame/test/url_request_test.cc b/chrome_frame/test/url_request_test.cc index f91fb9e..9274cce 100644 --- a/chrome_frame/test/url_request_test.cc +++ b/chrome_frame/test/url_request_test.cc @@ -5,6 +5,8 @@ #include <atlbase.h> #include <atlcom.h> +#include "base/bind.h" +#include "base/bind_helpers.h" #include "base/win/scoped_com_initializer.h" #include "chrome/common/automation_messages.h" #include "chrome_frame/test/chrome_frame_test_utils.h" @@ -50,13 +52,12 @@ class MockUrlDelegate : public PluginUrlRequestDelegate { static bool ImplementsThreadSafeReferenceCounting() { return false; } - void AddRef() {} - void Release() {} void PostponeReadRequest(chrome_frame_test::TimedMsgLoop* loop, UrlmonUrlRequest* request, int bytes_to_read) { - loop->PostDelayedTask(FROM_HERE, NewRunnableMethod(this, - &MockUrlDelegate::RequestRead, request, bytes_to_read), 0); + loop->PostTask(FROM_HERE, + base::Bind(&MockUrlDelegate::RequestRead, + base::Unretained(this), request, bytes_to_read)); } private: @@ -243,14 +244,14 @@ TEST(UrlmonUrlRequestTest, ZeroLengthResponse) { } ACTION_P4(ManagerRead, loop, mgr, request_id, bytes_to_read) { - loop->PostDelayedTask(FROM_HERE, NewRunnableMethod(mgr, - &UrlmonUrlRequestManager::ReadUrlRequest, request_id, - bytes_to_read), 0); + loop->PostTask(FROM_HERE, + base::Bind(&UrlmonUrlRequestManager::ReadUrlRequest, + base::Unretained(mgr), request_id, bytes_to_read)); } ACTION_P3(ManagerEndRequest, loop, mgr, request_id) { - loop->PostDelayedTask(FROM_HERE, NewRunnableMethod(mgr, - &UrlmonUrlRequestManager::EndUrlRequest, request_id, - net::URLRequestStatus()), 0); + loop->PostTask(FROM_HERE, base::Bind(&UrlmonUrlRequestManager::EndUrlRequest, + base::Unretained(mgr), request_id, + net::URLRequestStatus())); } // Simplest test - retrieve file from local web server. |