OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 "components/error_page/common/net_error_info.h" | 5 #include "components/error_page/common/net_error_info.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram_macros.h" |
9 | 9 |
10 namespace chrome_common_net { | 10 namespace chrome_common_net { |
11 | 11 |
12 const char kDnsProbeErrorDomain[] = "dnsprobe"; | 12 const char kDnsProbeErrorDomain[] = "dnsprobe"; |
13 | 13 |
14 const char* DnsProbeStatusToString(int status) { | 14 const char* DnsProbeStatusToString(int status) { |
15 switch (status) { | 15 switch (status) { |
16 case DNS_PROBE_POSSIBLE: | 16 case DNS_PROBE_POSSIBLE: |
17 return "DNS_PROBE_POSSIBLE"; | 17 return "DNS_PROBE_POSSIBLE"; |
18 case DNS_PROBE_NOT_RUN: | 18 case DNS_PROBE_NOT_RUN: |
(...skipping 18 matching lines...) Expand all Loading... |
37 return status >= DNS_PROBE_FINISHED_INCONCLUSIVE && | 37 return status >= DNS_PROBE_FINISHED_INCONCLUSIVE && |
38 status < DNS_PROBE_MAX; | 38 status < DNS_PROBE_MAX; |
39 } | 39 } |
40 | 40 |
41 void RecordEvent(NetworkErrorPageEvent event) { | 41 void RecordEvent(NetworkErrorPageEvent event) { |
42 UMA_HISTOGRAM_ENUMERATION("Net.ErrorPageCounts", event, | 42 UMA_HISTOGRAM_ENUMERATION("Net.ErrorPageCounts", event, |
43 NETWORK_ERROR_PAGE_EVENT_MAX); | 43 NETWORK_ERROR_PAGE_EVENT_MAX); |
44 } | 44 } |
45 | 45 |
46 } // namespace chrome_common_net | 46 } // namespace chrome_common_net |
OLD | NEW |