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

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

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger Created 5 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
« no previous file with comments | « net/base/net_util_icu.cc ('k') | net/filter/filter.cc » ('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_impl.h" 5 #include "net/dns/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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 bool ConfigureAsyncDnsNoFallbackFieldTrial() { 274 bool ConfigureAsyncDnsNoFallbackFieldTrial() {
275 const bool kDefault = false; 275 const bool kDefault = false;
276 276
277 // Configure the AsyncDns field trial as follows: 277 // Configure the AsyncDns field trial as follows:
278 // groups AsyncDnsNoFallbackA and AsyncDnsNoFallbackB: return true, 278 // groups AsyncDnsNoFallbackA and AsyncDnsNoFallbackB: return true,
279 // groups AsyncDnsA and AsyncDnsB: return false, 279 // groups AsyncDnsA and AsyncDnsB: return false,
280 // groups SystemDnsA and SystemDnsB: return false, 280 // groups SystemDnsA and SystemDnsB: return false,
281 // otherwise (trial absent): return default. 281 // otherwise (trial absent): return default.
282 std::string group_name = base::FieldTrialList::FindFullName("AsyncDns"); 282 std::string group_name = base::FieldTrialList::FindFullName("AsyncDns");
283 if (!group_name.empty()) 283 if (!group_name.empty())
284 return StartsWithASCII(group_name, "AsyncDnsNoFallback", false); 284 return base::StartsWithASCII(group_name, "AsyncDnsNoFallback", false);
285 return kDefault; 285 return kDefault;
286 } 286 }
287 287
288 //----------------------------------------------------------------------------- 288 //-----------------------------------------------------------------------------
289 289
290 AddressList EnsurePortOnAddressList(const AddressList& list, uint16 port) { 290 AddressList EnsurePortOnAddressList(const AddressList& list, uint16 port) {
291 if (list.empty() || list.front().port() == port) 291 if (list.empty() || list.front().port() == port)
292 return list; 292 return list;
293 return AddressList::CopyWithPort(list, port); 293 return AddressList::CopyWithPort(list, port);
294 } 294 }
(...skipping 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after
2412 dns_client_->SetConfig(dns_config); 2412 dns_client_->SetConfig(dns_config);
2413 num_dns_failures_ = 0; 2413 num_dns_failures_ = 0;
2414 if (dns_client_->GetConfig()) 2414 if (dns_client_->GetConfig())
2415 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.DnsClientEnabled", true); 2415 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.DnsClientEnabled", true);
2416 } 2416 }
2417 2417
2418 AbortDnsTasks(); 2418 AbortDnsTasks();
2419 } 2419 }
2420 2420
2421 } // namespace net 2421 } // namespace net
OLDNEW
« no previous file with comments | « net/base/net_util_icu.cc ('k') | net/filter/filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698