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