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

Side by Side Diff: net/socket/client_socket_pool_base_unittest.cc

Issue 2537373002: Use different source types for each ConnectJob subclass. (Closed)
Patch Set: mmenke comment Created 4 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
« no previous file with comments | « net/log/net_log_source_type_list.h ('k') | net/socket/socks_client_socket_pool.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/client_socket_pool_base.h" 5 #include "net/socket/client_socket_pool_base.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 base::TimeDelta timeout_duration, 281 base::TimeDelta timeout_duration,
282 ConnectJob::Delegate* delegate, 282 ConnectJob::Delegate* delegate,
283 MockClientSocketFactory* client_socket_factory, 283 MockClientSocketFactory* client_socket_factory,
284 NetLog* net_log) 284 NetLog* net_log)
285 : ConnectJob( 285 : ConnectJob(
286 group_name, 286 group_name,
287 timeout_duration, 287 timeout_duration,
288 request.priority(), 288 request.priority(),
289 request.respect_limits(), 289 request.respect_limits(),
290 delegate, 290 delegate,
291 NetLogWithSource::Make(net_log, NetLogSourceType::CONNECT_JOB)), 291 NetLogWithSource::Make(net_log,
292 NetLogSourceType::TRANSPORT_CONNECT_JOB)),
292 job_type_(job_type), 293 job_type_(job_type),
293 client_socket_factory_(client_socket_factory), 294 client_socket_factory_(client_socket_factory),
294 load_state_(LOAD_STATE_IDLE), 295 load_state_(LOAD_STATE_IDLE),
295 store_additional_error_state_(false), 296 store_additional_error_state_(false),
296 weak_factory_(this) {} 297 weak_factory_(this) {}
297 298
298 void Signal() { 299 void Signal() {
299 DoConnect(waiting_success_, true /* async */, false /* recoverable */); 300 DoConnect(waiting_success_, true /* async */, false /* recoverable */);
300 } 301 }
301 302
(...skipping 3498 matching lines...) Expand 10 before | Expand all | Expand 10 after
3800 request(1)->handle()->Reset(); 3801 request(1)->handle()->Reset();
3801 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a")); 3802 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3802 3803
3803 EXPECT_THAT(request(2)->WaitForResult(), IsOk()); 3804 EXPECT_THAT(request(2)->WaitForResult(), IsOk());
3804 EXPECT_FALSE(request(1)->have_result()); 3805 EXPECT_FALSE(request(1)->have_result());
3805 } 3806 }
3806 3807
3807 } // namespace 3808 } // namespace
3808 3809
3809 } // namespace net 3810 } // namespace net
OLDNEW
« no previous file with comments | « net/log/net_log_source_type_list.h ('k') | net/socket/socks_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698