| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 // cleaned up prior to |this| being destroyed. | 205 // cleaned up prior to |this| being destroyed. |
| 206 Flush(); | 206 Flush(); |
| 207 DCHECK(group_map_.empty()); | 207 DCHECK(group_map_.empty()); |
| 208 DCHECK(pending_callback_map_.empty()); | 208 DCHECK(pending_callback_map_.empty()); |
| 209 DCHECK_EQ(0, connecting_socket_count_); | 209 DCHECK_EQ(0, connecting_socket_count_); |
| 210 DCHECK(higher_layer_pools_.empty()); | 210 DCHECK(higher_layer_pools_.empty()); |
| 211 | 211 |
| 212 NetworkChangeNotifier::RemoveIPAddressObserver(this); | 212 NetworkChangeNotifier::RemoveIPAddressObserver(this); |
| 213 } | 213 } |
| 214 | 214 |
| 215 ClientSocketPoolBaseHelper::CallbackResultPair::~CallbackResultPair() {} |
| 216 |
| 215 // InsertRequestIntoQueue inserts the request into the queue based on | 217 // InsertRequestIntoQueue inserts the request into the queue based on |
| 216 // priority. Highest priorities are closest to the front. Older requests are | 218 // priority. Highest priorities are closest to the front. Older requests are |
| 217 // prioritized over requests of equal priority. | 219 // prioritized over requests of equal priority. |
| 218 // | 220 // |
| 219 // static | 221 // static |
| 220 void ClientSocketPoolBaseHelper::InsertRequestIntoQueue( | 222 void ClientSocketPoolBaseHelper::InsertRequestIntoQueue( |
| 221 const Request* r, RequestQueue* pending_requests) { | 223 const Request* r, RequestQueue* pending_requests) { |
| 222 RequestQueue::iterator it = pending_requests->begin(); | 224 RequestQueue::iterator it = pending_requests->begin(); |
| 223 while (it != pending_requests->end() && r->priority() >= (*it)->priority()) | 225 while (it != pending_requests->end() && r->priority() >= (*it)->priority()) |
| 224 ++it; | 226 ++it; |
| (...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1205 // Delete active jobs. | 1207 // Delete active jobs. |
| 1206 STLDeleteElements(&jobs_); | 1208 STLDeleteElements(&jobs_); |
| 1207 | 1209 |
| 1208 // Cancel pending backup job. | 1210 // Cancel pending backup job. |
| 1209 weak_factory_.InvalidateWeakPtrs(); | 1211 weak_factory_.InvalidateWeakPtrs(); |
| 1210 } | 1212 } |
| 1211 | 1213 |
| 1212 } // namespace internal | 1214 } // namespace internal |
| 1213 | 1215 |
| 1214 } // namespace net | 1216 } // namespace net |
| OLD | NEW |