Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: chrome/common/net/net_error_info.cc

Issue 207553008: Surface button for loading stale cache copy on net error page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix incorrect spelling of iOS. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/common/net/net_error_info.h" 7 #include "chrome/common/net/net_error_info.h"
7 8
8 namespace chrome_common_net { 9 namespace chrome_common_net {
9 10
10 const char kDnsProbeErrorDomain[] = "dnsprobe"; 11 const char kDnsProbeErrorDomain[] = "dnsprobe";
11 12
12 const char* DnsProbeStatusToString(int status) { 13 const char* DnsProbeStatusToString(int status) {
13 switch (status) { 14 switch (status) {
14 case DNS_PROBE_POSSIBLE: 15 case DNS_PROBE_POSSIBLE:
15 return "DNS_PROBE_POSSIBLE"; 16 return "DNS_PROBE_POSSIBLE";
(...skipping 13 matching lines...) Expand all
29 NOTREACHED(); 30 NOTREACHED();
30 return ""; 31 return "";
31 } 32 }
32 } 33 }
33 34
34 bool DnsProbeStatusIsFinished(DnsProbeStatus status) { 35 bool DnsProbeStatusIsFinished(DnsProbeStatus status) {
35 return status >= DNS_PROBE_FINISHED_INCONCLUSIVE && 36 return status >= DNS_PROBE_FINISHED_INCONCLUSIVE &&
36 status < DNS_PROBE_MAX; 37 status < DNS_PROBE_MAX;
37 } 38 }
38 39
40 void RecordEvent(NetworkErrorPageEvent event) {
41 UMA_HISTOGRAM_ENUMERATION("Net.ErrorPageCounts", event,
jar (doing other things) 2014/04/21 23:48:19 Please add an entry in tools/metrics/histograms/hi
Randy Smith (Not in Mondays) 2014/04/22 20:40:02 Apologies; as noted elsewhere, I was confused abou
42 NETWORK_ERROR_PAGE_EVENT_MAX);
43 }
44
39 } // namespace chrome_common_net 45 } // namespace chrome_common_net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698