Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef CHROME_COMMON_NET_NET_ERROR_INFO_H_ | 5 #ifndef CHROME_COMMON_NET_NET_ERROR_INFO_H_ |
| 6 #define CHROME_COMMON_NET_NET_ERROR_INFO_H_ | 6 #define CHROME_COMMON_NET_NET_ERROR_INFO_H_ |
| 7 | 7 |
| 8 namespace chrome_common_net { | 8 namespace chrome_common_net { |
| 9 | 9 |
| 10 enum DnsProbeResult { | 10 // The status of a DNS probe that the NetErrorTabHelper may or may not have |
| 11 DNS_PROBE_UNKNOWN, | 11 // started. |
| 12 DNS_PROBE_NO_INTERNET, | 12 enum DnsProbeStatus { |
| 13 DNS_PROBE_BAD_CONFIG, | 13 // A DNS probe may be run for this error page. (This status is only used on |
| 14 DNS_PROBE_NXDOMAIN, | 14 // the renderer side before it's received a status update from the browser.) |
| 15 DNS_PROBE_POSSIBLE, | |
|
mmenke
2013/06/13 20:04:55
I suggest merging this with DNS_PROBE_STARTED, and
Deprecated (see juliatuttle)
2013/06/18 19:36:37
The two are potentially different; if we ever add
| |
| 16 | |
| 17 // A DNS probe will not be run for this error page. (This happens if the | |
| 18 // user has the "Use web service to resolve navigation errors" preference | |
| 19 // turned off, or if probes are disabled by the field trial.) | |
| 20 DNS_PROBE_NOT_RUN, | |
| 21 | |
| 22 // A DNS probe has been started for this error page. The renderer should | |
| 23 // expect to receive another IPC with one of the FINISHED statuses once the | |
| 24 // probe has finished (as long as the error page is still loaded). | |
| 25 DNS_PROBE_STARTED, | |
| 26 | |
| 27 // A DNS probe has finished with one of the following results: | |
| 28 | |
| 29 // The probe was inconclusive.. | |
| 30 DNS_PROBE_FINISHED_UNKNOWN, | |
| 31 | |
| 32 // There's no internet connection. | |
| 33 DNS_PROBE_FINISHED_NO_INTERNET, | |
| 34 | |
| 35 // The DNS configuration is wrong, or the servers are down or broken. | |
| 36 DNS_PROBE_FINISHED_BAD_CONFIG, | |
| 37 | |
| 38 // The DNS servers are working fine, so the domain must not exist. | |
| 39 DNS_PROBE_FINISHED_NXDOMAIN, | |
| 40 | |
| 15 DNS_PROBE_MAX | 41 DNS_PROBE_MAX |
| 16 }; | 42 }; |
| 17 | 43 |
| 44 const char* DnsProbeStatusToString(int status); | |
| 45 bool DnsProbeStatusIsFinished(DnsProbeStatus status); | |
| 46 | |
| 47 bool DnsProbesEnabledByFieldTrial(); | |
| 48 | |
| 49 extern const char kDnsProbeErrorDomain[]; | |
| 50 | |
| 18 } // namespace chrome_common_net | 51 } // namespace chrome_common_net |
| 19 | 52 |
| 20 #endif // CHROME_COMMON_NET_NET_ERROR_INFO_H_ | 53 #endif // CHROME_COMMON_NET_NET_ERROR_INFO_H_ |
| OLD | NEW |