| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/socket/transport_client_socket_pool_test_util.h" | 5 #include "net/socket/transport_client_socket_pool_test_util.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 const RandIntCallback& rand_int_cb, | 365 const RandIntCallback& rand_int_cb, |
| 366 NetLog* net_log, | 366 NetLog* net_log, |
| 367 const NetLog::Source& source) { | 367 const NetLog::Source& source) { |
| 368 NOTREACHED(); | 368 NOTREACHED(); |
| 369 return scoped_ptr<DatagramClientSocket>(); | 369 return scoped_ptr<DatagramClientSocket>(); |
| 370 } | 370 } |
| 371 | 371 |
| 372 scoped_ptr<StreamSocket> | 372 scoped_ptr<StreamSocket> |
| 373 MockTransportClientSocketFactory::CreateTransportClientSocket( | 373 MockTransportClientSocketFactory::CreateTransportClientSocket( |
| 374 const AddressList& addresses, | 374 const AddressList& addresses, |
| 375 scoped_ptr<SocketPerformanceWatcher> /* socket_performance_watcher */, |
| 375 NetLog* /* net_log */, | 376 NetLog* /* net_log */, |
| 376 const NetLog::Source& /* source */) { | 377 const NetLog::Source& /* source */) { |
| 377 allocation_count_++; | 378 allocation_count_++; |
| 378 | 379 |
| 379 ClientSocketType type = client_socket_type_; | 380 ClientSocketType type = client_socket_type_; |
| 380 if (client_socket_types_ && client_socket_index_ < client_socket_index_max_) { | 381 if (client_socket_types_ && client_socket_index_ < client_socket_index_max_) { |
| 381 type = client_socket_types_[client_socket_index_++]; | 382 type = client_socket_types_[client_socket_index_++]; |
| 382 } | 383 } |
| 383 | 384 |
| 384 switch (type) { | 385 switch (type) { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 run_loop_quit_closure_ = run_loop.QuitClosure(); | 456 run_loop_quit_closure_ = run_loop.QuitClosure(); |
| 456 run_loop.Run(); | 457 run_loop.Run(); |
| 457 run_loop_quit_closure_.Reset(); | 458 run_loop_quit_closure_.Reset(); |
| 458 } | 459 } |
| 459 base::Closure trigger = triggerable_sockets_.front(); | 460 base::Closure trigger = triggerable_sockets_.front(); |
| 460 triggerable_sockets_.pop(); | 461 triggerable_sockets_.pop(); |
| 461 return trigger; | 462 return trigger; |
| 462 } | 463 } |
| 463 | 464 |
| 464 } // namespace net | 465 } // namespace net |
| OLD | NEW |