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

Unified Diff: net/socket/socket_test_util.h

Issue 8898036: base::Bind: Convert proxy_resolving_client_socket.[cc,h] and deps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Possible test fix. Created 9 years 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 | « net/socket/deterministic_socket_data_unittest.cc ('k') | net/socket/socket_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socket_test_util.h
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
index e4909c53c067c113e63764580370a11e15c16190..adb8ea9f3d909780e5b9596a426ea023b4160579 100644
--- a/net/socket/socket_test_util.h
+++ b/net/socket/socket_test_util.h
@@ -832,23 +832,25 @@ class MockUDPClientSocket : public DatagramClientSocket,
DISALLOW_COPY_AND_ASSIGN(MockUDPClientSocket);
};
-class TestSocketRequest : public CallbackRunner< Tuple1<int> > {
+class TestSocketRequest : public TestCompletionCallbackBase {
public:
- TestSocketRequest(
- std::vector<TestSocketRequest*>* request_order,
- size_t* completion_count);
+ TestSocketRequest(std::vector<TestSocketRequest*>* request_order,
+ size_t* completion_count);
virtual ~TestSocketRequest();
ClientSocketHandle* handle() { return &handle_; }
- int WaitForResult();
- virtual void RunWithParams(const Tuple1<int>& params) OVERRIDE;
+ const net::CompletionCallback& callback() const { return callback_; }
private:
+ void OnComplete(int result);
+
ClientSocketHandle handle_;
std::vector<TestSocketRequest*>* request_order_;
size_t* completion_count_;
- TestOldCompletionCallback callback_;
+ CompletionCallback callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestSocketRequest);
};
class ClientSocketPoolTest {
@@ -876,7 +878,7 @@ class ClientSocketPoolTest {
&completion_count_);
requests_.push_back(request);
int rv = request->handle()->Init(
- group_name, socket_params, priority, request,
+ group_name, socket_params, priority, request->callback(),
socket_pool, BoundNetLog());
if (rv != ERR_IO_PENDING)
request_order_.push_back(request);
« no previous file with comments | « net/socket/deterministic_socket_data_unittest.cc ('k') | net/socket/socket_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698