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 // Network error page events. Used for UMA statistics. | |
11 enum NetworkErrorPageEvent { | |
12 NET_ERROR_PAGE_SHOWN, // Error pages shown. | |
sky
2014/04/17 15:26:54
I would prefer you followed the convention in cont
Randy Smith (Not in Mondays)
2014/04/17 16:04:54
My 80 columns!! :-} Done.
| |
13 | |
14 NET_ERROR_PAGE_RELOAD_BUTTON_SHOWN, // Reload buttons shown. | |
15 NET_ERROR_PAGE_RELOAD_BUTTON_CLICKED, // Reload button clicked. | |
16 NET_ERROR_PAGE_RELOAD_BUTTON_ERROR, // Reload button clicked -> error. | |
17 | |
18 NET_ERROR_PAGE_LOAD_STALE_BUTTON_SHOWN, // Load stale buttons shown. | |
19 NET_ERROR_PAGE_LOAD_STALE_BUTTON_CLICKED, // Load stale button clicked. | |
20 NET_ERROR_PAGE_LOAD_STALE_BUTTON_ERROR, // Load stale buttons -> error. | |
21 | |
22 NET_ERROR_PAGE_MORE_BUTTON_CLICKED, // More button clicked. | |
23 | |
24 NET_ERROR_PAGE_BROWSER_INITIATED_RELOAD, // Reload initiated from browser. | |
25 | |
26 NET_ERROR_PAGE_EVENT_MAX, | |
27 }; | |
28 | |
10 // The status of a DNS probe that the NetErrorTabHelper may or may not have | 29 // The status of a DNS probe that the NetErrorTabHelper may or may not have |
11 // started. | 30 // started. |
12 // | 31 // |
13 // The DNS_PROBE_FINISHED_* values are used in histograms, so: | 32 // The DNS_PROBE_FINISHED_* values are used in histograms, so: |
14 // 1. FINISHED_UNKNOWN must remain the first FINISHED_* value. | 33 // 1. FINISHED_UNKNOWN must remain the first FINISHED_* value. |
15 // 2. FINISHED_* values must not be rearranged relative to FINISHED_UNKNOWN. | 34 // 2. FINISHED_* values must not be rearranged relative to FINISHED_UNKNOWN. |
16 // 3. New FINISHED_* values must be inserted at the end. | 35 // 3. New FINISHED_* values must be inserted at the end. |
17 // 4. New non-FINISHED_* values cannot be inserted. | 36 // 4. New non-FINISHED_* values cannot be inserted. |
18 enum DnsProbeStatus { | 37 enum DnsProbeStatus { |
19 // A DNS probe may be run for this error page. (This status is only used on | 38 // A DNS probe may be run for this error page. (This status is only used on |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 // |status| is an int because error codes are ints by the time they get to the | 74 // |status| is an int because error codes are ints by the time they get to the |
56 // localized error system, and we don't want to require the caller to cast back | 75 // localized error system, and we don't want to require the caller to cast back |
57 // to a probe status. The function will NOTREACHED() and return an empty | 76 // to a probe status. The function will NOTREACHED() and return an empty |
58 // string if given an int that does not match a value in DnsProbeStatus (or if | 77 // string if given an int that does not match a value in DnsProbeStatus (or if |
59 // it is DNS_PROBE_MAX, which is not a real status). | 78 // it is DNS_PROBE_MAX, which is not a real status). |
60 const char* DnsProbeStatusToString(int status); | 79 const char* DnsProbeStatusToString(int status); |
61 | 80 |
62 // Returns true if |status| is one of the DNS_PROBE_FINISHED_* statuses. | 81 // Returns true if |status| is one of the DNS_PROBE_FINISHED_* statuses. |
63 bool DnsProbeStatusIsFinished(DnsProbeStatus status); | 82 bool DnsProbeStatusIsFinished(DnsProbeStatus status); |
64 | 83 |
84 // Record specific error page events. | |
85 void RecordEvent(NetworkErrorPageEvent event); | |
86 | |
65 // The error domain used to pass DNS probe statuses to the localized error | 87 // The error domain used to pass DNS probe statuses to the localized error |
66 // code. | 88 // code. |
67 extern const char kDnsProbeErrorDomain[]; | 89 extern const char kDnsProbeErrorDomain[]; |
68 | 90 |
69 } // namespace chrome_common_net | 91 } // namespace chrome_common_net |
70 | 92 |
71 #endif // CHROME_COMMON_NET_NET_ERROR_INFO_H_ | 93 #endif // CHROME_COMMON_NET_NET_ERROR_INFO_H_ |
OLD | NEW |