Revert 248827 "android: Migrate old content readback to use asyn..."
[chromium-blink-merge.git] / chrome / common / net / net_error_info.cc
blob91a1ca94bc973d5c38d0d2d2ac25cce35ce3ff6f
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) {
13 switch (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";
28 default:
29 NOTREACHED();
30 return "";
34 bool DnsProbeStatusIsFinished(DnsProbeStatus status) {
35 return status >= DNS_PROBE_FINISHED_INCONCLUSIVE &&
36 status < DNS_PROBE_MAX;
39 } // namespace chrome_common_net