| 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 const RandIntCallback& rand_int_cb, | 373 const RandIntCallback& rand_int_cb, |
| 374 NetLog* net_log, | 374 NetLog* net_log, |
| 375 const NetLog::Source& source) { | 375 const NetLog::Source& source) { |
| 376 NOTREACHED(); | 376 NOTREACHED(); |
| 377 return scoped_ptr<DatagramClientSocket>(); | 377 return scoped_ptr<DatagramClientSocket>(); |
| 378 } | 378 } |
| 379 | 379 |
| 380 scoped_ptr<StreamSocket> | 380 scoped_ptr<StreamSocket> |
| 381 MockTransportClientSocketFactory::CreateTransportClientSocket( | 381 MockTransportClientSocketFactory::CreateTransportClientSocket( |
| 382 const AddressList& addresses, | 382 const AddressList& addresses, |
| 383 SocketPerformanceWatcherFactory* /* socket_performance_watcher_factory */, |
| 383 NetLog* /* net_log */, | 384 NetLog* /* net_log */, |
| 384 const NetLog::Source& /* source */) { | 385 const NetLog::Source& /* source */) { |
| 385 allocation_count_++; | 386 allocation_count_++; |
| 386 | 387 |
| 387 ClientSocketType type = client_socket_type_; | 388 ClientSocketType type = client_socket_type_; |
| 388 if (client_socket_types_ && client_socket_index_ < client_socket_index_max_) { | 389 if (client_socket_types_ && client_socket_index_ < client_socket_index_max_) { |
| 389 type = client_socket_types_[client_socket_index_++]; | 390 type = client_socket_types_[client_socket_index_++]; |
| 390 } | 391 } |
| 391 | 392 |
| 392 switch (type) { | 393 switch (type) { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 run_loop_quit_closure_ = run_loop.QuitClosure(); | 464 run_loop_quit_closure_ = run_loop.QuitClosure(); |
| 464 run_loop.Run(); | 465 run_loop.Run(); |
| 465 run_loop_quit_closure_.Reset(); | 466 run_loop_quit_closure_.Reset(); |
| 466 } | 467 } |
| 467 base::Closure trigger = triggerable_sockets_.front(); | 468 base::Closure trigger = triggerable_sockets_.front(); |
| 468 triggerable_sockets_.pop(); | 469 triggerable_sockets_.pop(); |
| 469 return trigger; | 470 return trigger; |
| 470 } | 471 } |
| 471 | 472 |
| 472 } // namespace net | 473 } // namespace net |
| OLD | NEW |