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

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

Issue 2811183003: Change Cronet's "disable_ipv6" to "disable_ipv6_on_wifi" (Closed)
Patch Set: more comments Created 3 years, 8 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/fuzzed_host_resolver.h ('k') | net/dns/host_resolver.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/fuzzed_host_resolver.h" 5 #include "net/dns/fuzzed_host_resolver.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 config.use_local_ipv6 = data_provider_->ConsumeBool(); 216 config.use_local_ipv6 = data_provider_->ConsumeBool();
217 217
218 std::unique_ptr<DnsClient> dns_client = DnsClient::CreateClientForTesting( 218 std::unique_ptr<DnsClient> dns_client = DnsClient::CreateClientForTesting(
219 net_log_, &socket_factory_, 219 net_log_, &socket_factory_,
220 base::Bind(&base::FuzzedDataProvider::ConsumeInt32InRange, 220 base::Bind(&base::FuzzedDataProvider::ConsumeInt32InRange,
221 base::Unretained(data_provider_))); 221 base::Unretained(data_provider_)));
222 dns_client->SetConfig(config); 222 dns_client->SetConfig(config);
223 SetDnsClient(std::move(dns_client)); 223 SetDnsClient(std::move(dns_client));
224 } 224 }
225 225
226 bool FuzzedHostResolver::IsIPv6Reachable(const NetLogWithSource& net_log) { 226 bool FuzzedHostResolver::IsGloballyReachable(const IPAddress& dest,
227 const NetLogWithSource& net_log) {
227 return is_ipv6_reachable_; 228 return is_ipv6_reachable_;
228 } 229 }
229 230
230 void FuzzedHostResolver::RunLoopbackProbeJob() { 231 void FuzzedHostResolver::RunLoopbackProbeJob() {
231 SetHaveOnlyLoopbackAddresses(data_provider_->ConsumeBool()); 232 SetHaveOnlyLoopbackAddresses(data_provider_->ConsumeBool());
232 } 233 }
233 234
234 } // namespace net 235 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/fuzzed_host_resolver.h ('k') | net/dns/host_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698