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

Side by Side Diff: net/base/net_errors.cc

Issue 6975027: Add metrics for DHCP WPAD feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add tracking of unhandled DHCP API errors. Created 9 years, 7 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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "net/base/net_errors.h" 5 #include "net/base/net_errors.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/stringize_macros.h" 8 #include "base/stringize_macros.h"
9 9
10 namespace net { 10 namespace net {
11 11
12 const char kErrorDomain[] = "net"; 12 const char kErrorDomain[] = "net";
13 13
14 const char* ErrorToString(int error) { 14 const char* ErrorToString(int error) {
15 if (error == 0) 15 if (error == 0)
16 return "net::OK"; 16 return "net::OK";
17 17
18 switch (error) { 18 switch (error) {
19 #define NET_ERROR(label, value) \ 19 #define NET_ERROR(label, value) \
20 case ERR_ ## label: \ 20 case ERR_ ## label: \
21 return "net::" STRINGIZE_NO_EXPANSION(ERR_ ## label); 21 return "net::" STRINGIZE_NO_EXPANSION(ERR_ ## label);
22 #include "net/base/net_error_list.h" 22 #include "net/base/net_error_list.h"
23 #undef NET_ERROR 23 #undef NET_ERROR
24 default: 24 default:
25 return "net::<unknown>"; 25 return "net::<unknown>";
26 } 26 }
27 } 27 }
28 28
29 std::vector<int> GetAllErrorCodesForUma() {
30 std::vector<int> all_error_codes;
31 #define NET_ERROR(label, value) all_error_codes.push_back(-(value));
jar (doing other things) 2011/05/19 23:25:38 Although this was copied.... it might be better t
32 #include "net/base/net_error_list.h"
33 #undef NET_ERROR
34 return all_error_codes;
35 }
36
29 } // namespace net 37 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698