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 // The status of a DNS probe that the NetErrorTabHelper may or may not have | |
| 11 // started. | |
| 12 enum DnsProbeStatus { | |
| 13 DNS_PROBE_STARTED, // The helper has started a probe; expect another IPC | |
| 14 // with status _FINISHED once it returns if the tab is | |
| 15 // still showing a DNS error page. | |
| 16 | |
| 17 DNS_PROBE_FINISHED, // The helper has received a result from the DNS probe it | |
| 18 // started. | |
| 19 | |
| 20 DNS_PROBE_NOT_RUN, // The helper is not running a DNS probe for this error | |
| 21 // page. | |
|
mmenke
2013/04/01 17:44:12
nit: Suggest comments on the line before the stat
Deprecated (see juliatuttle)
2013/04/09 20:35:49
Done.
| |
| 22 | |
| 23 DNS_PROBE_STATUS_MAX | |
| 24 }; | |
| 25 | |
| 10 enum DnsProbeResult { | 26 enum DnsProbeResult { |
| 11 DNS_PROBE_UNKNOWN, | 27 DNS_PROBE_UNKNOWN, |
| 12 DNS_PROBE_NO_INTERNET, | 28 DNS_PROBE_NO_INTERNET, |
| 13 DNS_PROBE_BAD_CONFIG, | 29 DNS_PROBE_BAD_CONFIG, |
| 14 DNS_PROBE_NXDOMAIN, | 30 DNS_PROBE_NXDOMAIN, |
| 15 DNS_PROBE_MAX | 31 DNS_PROBE_MAX |
| 16 }; | 32 }; |
| 17 | 33 |
| 34 enum DnsProbeError { | |
|
mmenke
2013/04/01 17:44:12
I think separating this out from DnsProbeResult is
Deprecated (see juliatuttle)
2013/04/09 20:35:49
Done.
| |
| 35 // Error is eligible for a DNS probe; we don't know until we get an IPC | |
| 36 // whether we are running one. | |
| 37 DNS_PROBE_ERR_POSSIBLE, | |
| 38 | |
| 39 // We know we are running a DNS probe, but don't know the result yet. | |
| 40 DNS_PROBE_ERR_RUNNING, | |
| 41 | |
| 42 // We finished a probe. (This must remain the last element; the result is | |
| 43 // added to it before passing to GetErrorStrings. | |
|
mmenke
2013/04/01 17:44:12
nit: Missing close parens.
Deprecated (see juliatuttle)
2013/04/09 20:35:49
Done.
| |
| 44 DNS_PROBE_ERR_FINISHED, // + DnsProbeResult | |
|
mmenke
2013/04/01 17:44:12
nit: Two spaces between code and comment.
Deprecated (see juliatuttle)
2013/04/09 20:35:49
Done.
| |
| 45 }; | |
| 46 | |
| 47 const char* DnsProbeErrorToString(int error); | |
| 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 |