OLD | NEW |
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 <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 // Indicate whether or not we should establish a new transport layer connection | 47 // Indicate whether or not we should establish a new transport layer connection |
48 // after a certain timeout has passed without receiving an ACK. | 48 // after a certain timeout has passed without receiving an ACK. |
49 bool g_connect_backup_jobs_enabled = true; | 49 bool g_connect_backup_jobs_enabled = true; |
50 | 50 |
51 } // namespace | 51 } // namespace |
52 | 52 |
53 ConnectJob::ConnectJob(const std::string& group_name, | 53 ConnectJob::ConnectJob(const std::string& group_name, |
54 base::TimeDelta timeout_duration, | 54 base::TimeDelta timeout_duration, |
55 RequestPriority priority, | 55 RequestPriority priority, |
| 56 bool ignore_limits, |
56 Delegate* delegate, | 57 Delegate* delegate, |
57 const BoundNetLog& net_log) | 58 const BoundNetLog& net_log) |
58 : group_name_(group_name), | 59 : group_name_(group_name), |
59 timeout_duration_(timeout_duration), | 60 timeout_duration_(timeout_duration), |
60 priority_(priority), | 61 priority_(priority), |
| 62 ignore_limits_(ignore_limits), |
61 delegate_(delegate), | 63 delegate_(delegate), |
62 net_log_(net_log), | 64 net_log_(net_log), |
63 idle_(true) { | 65 idle_(true) { |
64 DCHECK(!group_name.empty()); | 66 DCHECK(!group_name.empty()); |
65 DCHECK(delegate); | 67 DCHECK(delegate); |
66 net_log.BeginEvent(NetLog::TYPE_SOCKET_POOL_CONNECT_JOB, | 68 net_log.BeginEvent(NetLog::TYPE_SOCKET_POOL_CONNECT_JOB, |
67 NetLog::StringCallback("group_name", &group_name_)); | 69 NetLog::StringCallback("group_name", &group_name_)); |
68 } | 70 } |
69 | 71 |
70 ConnectJob::~ConnectJob() { | 72 ConnectJob::~ConnectJob() { |
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1344 // If there are no more requests, kill the backup timer. | 1346 // If there are no more requests, kill the backup timer. |
1345 if (pending_requests_.empty()) | 1347 if (pending_requests_.empty()) |
1346 backup_job_timer_.Stop(); | 1348 backup_job_timer_.Stop(); |
1347 request->CrashIfInvalid(); | 1349 request->CrashIfInvalid(); |
1348 return request; | 1350 return request; |
1349 } | 1351 } |
1350 | 1352 |
1351 } // namespace internal | 1353 } // namespace internal |
1352 | 1354 |
1353 } // namespace net | 1355 } // namespace net |
OLD | NEW |