| 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 "chrome/browser/net/predictor.h" | 5 #include "chrome/browser/net/predictor.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <sstream> | 10 #include <sstream> |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 Predictor* predictor_; // The predictor which started us. | 119 Predictor* predictor_; // The predictor which started us. |
| 120 | 120 |
| 121 const GURL url_; // Hostname to resolve. | 121 const GURL url_; // Hostname to resolve. |
| 122 net::SingleRequestHostResolver resolver_; | 122 net::SingleRequestHostResolver resolver_; |
| 123 net::AddressList addresses_; | 123 net::AddressList addresses_; |
| 124 | 124 |
| 125 DISALLOW_COPY_AND_ASSIGN(LookupRequest); | 125 DISALLOW_COPY_AND_ASSIGN(LookupRequest); |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 Predictor::Predictor(bool preconnect_enabled) | 128 Predictor::Predictor(bool preconnect_enabled) |
| 129 : initial_observer_(NULL), | 129 : url_request_context_getter_(NULL), |
| 130 url_request_context_getter_(NULL), | |
| 131 predictor_enabled_(true), | 130 predictor_enabled_(true), |
| 132 peak_pending_lookups_(0), | 131 peak_pending_lookups_(0), |
| 133 shutdown_(false), | 132 shutdown_(false), |
| 134 max_concurrent_dns_lookups_(g_max_parallel_resolves), | 133 max_concurrent_dns_lookups_(g_max_parallel_resolves), |
| 135 max_dns_queue_delay_( | 134 max_dns_queue_delay_( |
| 136 TimeDelta::FromMilliseconds(g_max_queueing_delay_ms)), | 135 TimeDelta::FromMilliseconds(g_max_queueing_delay_ms)), |
| 137 host_resolver_(NULL), | 136 host_resolver_(NULL), |
| 138 preconnect_enabled_(preconnect_enabled), | 137 preconnect_enabled_(preconnect_enabled), |
| 139 consecutive_omnibox_preconnect_count_(0), | 138 consecutive_omnibox_preconnect_count_(0), |
| 140 recent_preconnects_( | 139 recent_preconnects_( |
| (...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1227 IOThread* io_thread, | 1226 IOThread* io_thread, |
| 1228 net::URLRequestContextGetter* getter) { | 1227 net::URLRequestContextGetter* getter) { |
| 1229 // Empty function for unittests. | 1228 // Empty function for unittests. |
| 1230 } | 1229 } |
| 1231 | 1230 |
| 1232 void SimplePredictor::ShutdownOnUIThread(PrefService* user_prefs) { | 1231 void SimplePredictor::ShutdownOnUIThread(PrefService* user_prefs) { |
| 1233 SetShutdown(true); | 1232 SetShutdown(true); |
| 1234 } | 1233 } |
| 1235 | 1234 |
| 1236 } // namespace chrome_browser_net | 1235 } // namespace chrome_browser_net |
| OLD | NEW |