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

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

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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 NET_BASE_NET_ERRORS_H__ 5 #ifndef NET_BASE_NET_ERRORS_H__
6 #define NET_BASE_NET_ERRORS_H__ 6 #define NET_BASE_NET_ERRORS_H__
7 #pragma once 7 #pragma once
8 8
9 #include <vector>
10
9 #include "base/basictypes.h" 11 #include "base/basictypes.h"
10 12
11 namespace net { 13 namespace net {
12 14
13 // Error domain of the net module's error codes. 15 // Error domain of the net module's error codes.
14 extern const char kErrorDomain[]; 16 extern const char kErrorDomain[];
15 17
16 // Error values are negative. 18 // Error values are negative.
17 enum Error { 19 enum Error {
18 // No error. 20 // No error.
(...skipping 13 matching lines...) Expand all
32 // Returns true if |error| is a certificate error code. 34 // Returns true if |error| is a certificate error code.
33 inline bool IsCertificateError(int error) { 35 inline bool IsCertificateError(int error) {
34 // Certificate errors are negative integers from net::ERR_CERT_BEGIN 36 // Certificate errors are negative integers from net::ERR_CERT_BEGIN
35 // (inclusive) to net::ERR_CERT_END (exclusive) in *decreasing* order. 37 // (inclusive) to net::ERR_CERT_END (exclusive) in *decreasing* order.
36 return error <= ERR_CERT_BEGIN && error > ERR_CERT_END; 38 return error <= ERR_CERT_BEGIN && error > ERR_CERT_END;
37 } 39 }
38 40
39 // Map system error code to Error. 41 // Map system error code to Error.
40 Error MapSystemError(int os_error); 42 Error MapSystemError(int os_error);
41 43
44 // Returns a list of all the possible net error codes (not counting OK). This
45 // is intended for use with UMA histograms that are reporting the result of
46 // an action that is represented as a net error code.
47 //
48 // Note that the error codes are all positive (since histograms expect positive
49 // sample values).
50 std::vector<int> GetAllErrorCodesForUma();
51
42 } // namespace net 52 } // namespace net
43 53
44 #endif // NET_BASE_NET_ERRORS_H__ 54 #endif // NET_BASE_NET_ERRORS_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698