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

Side by Side Diff: net/spdy/spdy_proxy_client_socket_unittest.cc

Issue 8738001: Remove BindStateHolder and have Bind() return a Callback<> object directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more compile fixes 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/web_socket_server_socket.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/spdy_proxy_client_socket.h" 5 #include "net/spdy/spdy_proxy_client_socket.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "net/base/address_list.h" 8 #include "net/base/address_list.h"
9 #include "net/base/net_log.h" 9 #include "net/base/net_log.h"
10 #include "net/base/net_log_unittest.h" 10 #include "net/base/net_log_unittest.h"
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 1339
1340 AssertConnectSucceeds(); 1340 AssertConnectSucceeds();
1341 1341
1342 EXPECT_TRUE(sock_->IsConnected()); 1342 EXPECT_TRUE(sock_->IsConnected());
1343 1343
1344 DeleteSockCallback read_callback(&sock_); 1344 DeleteSockCallback read_callback(&sock_);
1345 1345
1346 scoped_refptr<IOBuffer> read_buf(new IOBuffer(kLen1)); 1346 scoped_refptr<IOBuffer> read_buf(new IOBuffer(kLen1));
1347 ASSERT_EQ(ERR_IO_PENDING, 1347 ASSERT_EQ(ERR_IO_PENDING,
1348 sock_->Read(read_buf, kLen1, 1348 sock_->Read(read_buf, kLen1,
1349 base::Bind(&DeleteSockCallback::Run<int>, 1349 base::Bind(&OldCompletionCallbackAdapter,
1350 base::Unretained(&read_callback)))); 1350 &read_callback)));
1351 1351
1352 scoped_refptr<IOBufferWithSize> write_buf(CreateBuffer(kMsg1, kLen1)); 1352 scoped_refptr<IOBufferWithSize> write_buf(CreateBuffer(kMsg1, kLen1));
1353 EXPECT_EQ(ERR_IO_PENDING, sock_->Write(write_buf, write_buf->size(), 1353 EXPECT_EQ(ERR_IO_PENDING, sock_->Write(write_buf, write_buf->size(),
1354 write_callback_.callback())); 1354 write_callback_.callback()));
1355 1355
1356 Run(2); 1356 Run(2);
1357 1357
1358 EXPECT_FALSE(sock_.get()); 1358 EXPECT_FALSE(sock_.get());
1359 EXPECT_TRUE(read_callback.have_result()); 1359 EXPECT_TRUE(read_callback.have_result());
1360 EXPECT_FALSE(write_callback_.have_result()); 1360 EXPECT_FALSE(write_callback_.have_result());
1361 } 1361 }
1362 1362
1363 } // namespace net 1363 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/web_socket_server_socket.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698