Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Unified Diff: chrome_frame/test/url_request_test.cc

Issue 8555001: base::Bind: Convert chrome_frame/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win-dies. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/test/test_server.cc ('k') | chrome_frame/test/win_event_receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/test/url_request_test.cc
diff --git a/chrome_frame/test/url_request_test.cc b/chrome_frame/test/url_request_test.cc
index f91fb9ef9134cc71402c33d724507d3f1234fa10..9274ccef36ae2b85c2020bff0b2633eca6af75c4 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.
« no previous file with comments | « chrome_frame/test/test_server.cc ('k') | chrome_frame/test/win_event_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698