Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1103)

Side by Side Diff: net/base/host_resolver_impl.cc

Issue 2873003: Disable caching of failed DNS lookups. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <Winsock2.h> 8 #include <Winsock2.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <netdb.h> 10 #include <netdb.h>
(...skipping 27 matching lines...) Expand all
38 namespace net { 38 namespace net {
39 39
40 namespace { 40 namespace {
41 41
42 HostCache* CreateDefaultCache() { 42 HostCache* CreateDefaultCache() {
43 static const size_t kMaxHostCacheEntries = 100; 43 static const size_t kMaxHostCacheEntries = 100;
44 44
45 HostCache* cache = new HostCache( 45 HostCache* cache = new HostCache(
46 kMaxHostCacheEntries, 46 kMaxHostCacheEntries,
47 base::TimeDelta::FromMinutes(1), 47 base::TimeDelta::FromMinutes(1),
48 base::TimeDelta::FromMinutes(1)); 48 base::TimeDelta::FromSeconds(0)); // Disable caching of failed DNS.
49 49
50 return cache; 50 return cache;
51 } 51 }
52 52
53 } // anonymous namespace 53 } // anonymous namespace
54 54
55 HostResolver* CreateSystemHostResolver( 55 HostResolver* CreateSystemHostResolver(
56 NetworkChangeNotifier* network_change_notifier) { 56 NetworkChangeNotifier* network_change_notifier) {
57 // Maximum of 50 concurrent threads. 57 // Maximum of 50 concurrent threads.
58 // TODO(eroman): Adjust this, do some A/B experiments. 58 // TODO(eroman): Adjust this, do some A/B experiments.
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 if (r == req) 1154 if (r == req)
1155 return error; 1155 return error;
1156 1156
1157 r->OnComplete(error, AddressList()); 1157 r->OnComplete(error, AddressList());
1158 } 1158 }
1159 1159
1160 return ERR_IO_PENDING; 1160 return ERR_IO_PENDING;
1161 } 1161 }
1162 1162
1163 } // namespace net 1163 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698