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 <math.h> | 7 #include <math.h> |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 // cleaned up prior to |this| being destroyed. | 191 // cleaned up prior to |this| being destroyed. |
192 Flush(); | 192 Flush(); |
193 DCHECK(group_map_.empty()); | 193 DCHECK(group_map_.empty()); |
194 DCHECK(pending_callback_map_.empty()); | 194 DCHECK(pending_callback_map_.empty()); |
195 DCHECK_EQ(0, connecting_socket_count_); | 195 DCHECK_EQ(0, connecting_socket_count_); |
196 CHECK(higher_layer_pools_.empty()); | 196 CHECK(higher_layer_pools_.empty()); |
197 | 197 |
198 NetworkChangeNotifier::RemoveIPAddressObserver(this); | 198 NetworkChangeNotifier::RemoveIPAddressObserver(this); |
199 } | 199 } |
200 | 200 |
| 201 ClientSocketPoolBaseHelper::CallbackResultPair::CallbackResultPair() |
| 202 : result(OK) { |
| 203 } |
| 204 |
| 205 ClientSocketPoolBaseHelper::CallbackResultPair::CallbackResultPair( |
| 206 const CompletionCallback& callback_in, int result_in) |
| 207 : callback(callback_in), |
| 208 result(result_in) { |
| 209 } |
| 210 |
201 ClientSocketPoolBaseHelper::CallbackResultPair::~CallbackResultPair() {} | 211 ClientSocketPoolBaseHelper::CallbackResultPair::~CallbackResultPair() {} |
202 | 212 |
203 // InsertRequestIntoQueue inserts the request into the queue based on | 213 // InsertRequestIntoQueue inserts the request into the queue based on |
204 // priority. Highest priorities are closest to the front. Older requests are | 214 // priority. Highest priorities are closest to the front. Older requests are |
205 // prioritized over requests of equal priority. | 215 // prioritized over requests of equal priority. |
206 // | 216 // |
207 // static | 217 // static |
208 void ClientSocketPoolBaseHelper::InsertRequestIntoQueue( | 218 void ClientSocketPoolBaseHelper::InsertRequestIntoQueue( |
209 const Request* r, RequestQueue* pending_requests) { | 219 const Request* r, RequestQueue* pending_requests) { |
210 RequestQueue::iterator it = pending_requests->begin(); | 220 RequestQueue::iterator it = pending_requests->begin(); |
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1219 STLDeleteElements(&jobs_); | 1229 STLDeleteElements(&jobs_); |
1220 unassigned_job_count_ = 0; | 1230 unassigned_job_count_ = 0; |
1221 | 1231 |
1222 // Cancel pending backup job. | 1232 // Cancel pending backup job. |
1223 weak_factory_.InvalidateWeakPtrs(); | 1233 weak_factory_.InvalidateWeakPtrs(); |
1224 } | 1234 } |
1225 | 1235 |
1226 } // namespace internal | 1236 } // namespace internal |
1227 | 1237 |
1228 } // namespace net | 1238 } // namespace net |
OLD | NEW |