1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/logging.h"
6 #include "chrome/common/net/net_error_info.h"
8 namespace chrome_common_net
{
10 const char kDnsProbeErrorDomain
[] = "dnsprobe";
12 const char* DnsProbeStatusToString(int status
) {
14 case DNS_PROBE_POSSIBLE
:
15 return "DNS_PROBE_POSSIBLE";
16 case DNS_PROBE_NOT_RUN
:
17 return "DNS_PROBE_NOT_RUN";
18 case DNS_PROBE_STARTED
:
19 return "DNS_PROBE_STARTED";
20 case DNS_PROBE_FINISHED_INCONCLUSIVE
:
21 return "DNS_PROBE_FINISHED_INCONCLUSIVE";
22 case DNS_PROBE_FINISHED_NO_INTERNET
:
23 return "DNS_PROBE_FINISHED_NO_INTERNET";
24 case DNS_PROBE_FINISHED_BAD_CONFIG
:
25 return "DNS_PROBE_FINISHED_BAD_CONFIG";
26 case DNS_PROBE_FINISHED_NXDOMAIN
:
27 return "DNS_PROBE_FINISHED_NXDOMAIN";
34 bool DnsProbeStatusIsFinished(DnsProbeStatus status
) {
35 return status
>= DNS_PROBE_FINISHED_INCONCLUSIVE
&&
36 status
< DNS_PROBE_MAX
;
39 } // namespace chrome_common_net