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