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/dns_config_service_posix.cc

Issue 1778933002: DNS: Per-network-type and Finch-variable timeouts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove change to gdig. Created 4 years, 9 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/dns_config_service.cc ('k') | net/dns/dns_session.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 (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/dns_config_service_posix.h" 5 #include "net/dns/dns_config_service_posix.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 case CONFIG_PARSE_POSIX_OK: 143 case CONFIG_PARSE_POSIX_OK:
144 break; 144 break;
145 case CONFIG_PARSE_POSIX_UNHANDLED_OPTIONS: 145 case CONFIG_PARSE_POSIX_UNHANDLED_OPTIONS:
146 LOG(WARNING) << "dns_config has unhandled options!"; 146 LOG(WARNING) << "dns_config has unhandled options!";
147 config->unhandled_options = true; 147 config->unhandled_options = true;
148 default: 148 default:
149 return error; 149 return error;
150 } 150 }
151 #endif // defined(OS_MACOSX) && !defined(OS_IOS) 151 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
152 // Override timeout value to match default setting on Windows. 152 // Override timeout value to match default setting on Windows.
153 config->timeout = base::TimeDelta::FromSeconds(kDnsTimeoutSeconds); 153 config->timeout = base::TimeDelta::FromMilliseconds(kDnsDefaultTimeoutMs);
154 return result; 154 return result;
155 } 155 }
156 #else // defined(OS_ANDROID) 156 #else // defined(OS_ANDROID)
157 // Theoretically, this is bad. __system_property_get is not a supported API 157 // Theoretically, this is bad. __system_property_get is not a supported API
158 // (but it's currently visible to anyone using Bionic), and the properties 158 // (but it's currently visible to anyone using Bionic), and the properties
159 // are implementation details that may disappear in future Android releases. 159 // are implementation details that may disappear in future Android releases.
160 // Practically, libcutils provides property_get, which is a public API, and the 160 // Practically, libcutils provides property_get, which is a public API, and the
161 // DNS code (and its clients) are already robust against failing to get the DNS 161 // DNS code (and its clients) are already robust against failing to get the DNS
162 // config for whatever reason, so the properties can disappear and the world 162 // config for whatever reason, so the properties can disappear and the world
163 // won't end. 163 // won't end.
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 #endif // defined(OS_ANDROID) 583 #endif // defined(OS_ANDROID)
584 584
585 } // namespace internal 585 } // namespace internal
586 586
587 // static 587 // static
588 scoped_ptr<DnsConfigService> DnsConfigService::CreateSystemService() { 588 scoped_ptr<DnsConfigService> DnsConfigService::CreateSystemService() {
589 return scoped_ptr<DnsConfigService>(new internal::DnsConfigServicePosix()); 589 return scoped_ptr<DnsConfigService>(new internal::DnsConfigServicePosix());
590 } 590 }
591 591
592 } // namespace net 592 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/dns_config_service.cc ('k') | net/dns/dns_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698