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

Side by Side Diff: net/dns/host_resolver.cc

Issue 1898873006: Cronet: Use stale DNS cache entries experimentally. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dns_stale2
Patch Set: Resolve merge conflict. Created 4 years, 3 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
« no previous file with comments | « net/dns/host_resolver.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | 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) 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/dns/host_resolver.h" 5 #include "net/dns/host_resolver.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h"
8 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
9 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_split.h" 11 #include "base/strings/string_split.h"
11 #include "base/values.h" 12 #include "base/values.h"
12 #include "net/base/net_errors.h" 13 #include "net/base/net_errors.h"
13 #include "net/dns/dns_client.h" 14 #include "net/dns/dns_client.h"
14 #include "net/dns/dns_config_service.h" 15 #include "net/dns/dns_config_service.h"
15 #include "net/dns/host_cache.h" 16 #include "net/dns/host_cache.h"
16 #include "net/dns/host_resolver_impl.h" 17 #include "net/dns/host_resolver_impl.h"
17 18
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 } 129 }
129 130
130 void HostResolver::InitializePersistence( 131 void HostResolver::InitializePersistence(
131 const PersistCallback& persist_callback, 132 const PersistCallback& persist_callback,
132 std::unique_ptr<const base::Value> old_data) {} 133 std::unique_ptr<const base::Value> old_data) {}
133 134
134 // static 135 // static
135 std::unique_ptr<HostResolver> HostResolver::CreateSystemResolver( 136 std::unique_ptr<HostResolver> HostResolver::CreateSystemResolver(
136 const Options& options, 137 const Options& options,
137 NetLog* net_log) { 138 NetLog* net_log) {
138 return std::unique_ptr<HostResolver>(new HostResolverImpl(options, net_log)); 139 return std::unique_ptr<HostResolver>(
140 CreateSystemResolverImpl(options, net_log).release());
141 }
142
143 // static
144 std::unique_ptr<HostResolverImpl> HostResolver::CreateSystemResolverImpl(
145 const Options& options,
146 NetLog* net_log) {
147 return base::WrapUnique(new HostResolverImpl(options, net_log));
139 } 148 }
140 149
141 // static 150 // static
142 std::unique_ptr<HostResolver> HostResolver::CreateDefaultResolver( 151 std::unique_ptr<HostResolver> HostResolver::CreateDefaultResolver(
143 NetLog* net_log) { 152 NetLog* net_log) {
144 return std::unique_ptr<HostResolver>( 153 return CreateSystemResolver(Options(), net_log);
145 new HostResolverImpl(Options(), net_log));
146 } 154 }
147 155
148 HostResolver::HostResolver() { 156 // static
157 std::unique_ptr<HostResolverImpl> HostResolver::CreateDefaultResolverImpl(
158 NetLog* net_log) {
159 return CreateSystemResolverImpl(Options(), net_log);
149 } 160 }
150 161
162 HostResolver::HostResolver() {}
163
151 } // namespace net 164 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/host_resolver.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698