| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/base/host_resolver_impl.h" | 5 #include "net/base/host_resolver_impl.h" |
| 6 #include "net/base/net_log.h" | 6 #include "net/base/net_log.h" |
| 7 | 7 |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <deque> | 9 #include <deque> |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 namespace net { | 31 namespace net { |
| 32 | 32 |
| 33 namespace { | 33 namespace { |
| 34 | 34 |
| 35 HostCache* CreateDefaultCache() { | 35 HostCache* CreateDefaultCache() { |
| 36 static const size_t kMaxHostCacheEntries = 100; | 36 static const size_t kMaxHostCacheEntries = 100; |
| 37 | 37 |
| 38 HostCache* cache = new HostCache( | 38 HostCache* cache = new HostCache( |
| 39 kMaxHostCacheEntries, | 39 kMaxHostCacheEntries, |
| 40 base::TimeDelta::FromMinutes(1), | 40 base::TimeDelta::FromMinutes(1), |
| 41 base::TimeDelta::FromSeconds(1)); | 41 base::TimeDelta::FromMinutes(1)); |
| 42 | 42 |
| 43 return cache; | 43 return cache; |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // anonymous namespace | 46 } // anonymous namespace |
| 47 | 47 |
| 48 HostResolver* CreateSystemHostResolver( | 48 HostResolver* CreateSystemHostResolver( |
| 49 NetworkChangeNotifier* network_change_notifier) { | 49 NetworkChangeNotifier* network_change_notifier) { |
| 50 // Maximum of 50 concurrent threads. | 50 // Maximum of 50 concurrent threads. |
| 51 // TODO(eroman): Adjust this, do some A/B experiments. | 51 // TODO(eroman): Adjust this, do some A/B experiments. |
| (...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 if (r == req) | 1184 if (r == req) |
| 1185 return error; | 1185 return error; |
| 1186 | 1186 |
| 1187 r->OnComplete(error, AddressList()); | 1187 r->OnComplete(error, AddressList()); |
| 1188 } | 1188 } |
| 1189 | 1189 |
| 1190 return ERR_IO_PENDING; | 1190 return ERR_IO_PENDING; |
| 1191 } | 1191 } |
| 1192 | 1192 |
| 1193 } // namespace net | 1193 } // namespace net |
| OLD | NEW |