OLD | NEW |
---|---|
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 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/platform_file.h" | |
11 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
12 | 13 |
13 namespace net { | 14 namespace net { |
14 | 15 |
15 // Error domain of the net module's error codes. | 16 // Error domain of the net module's error codes. |
16 NET_EXPORT extern const char kErrorDomain[]; | 17 NET_EXPORT extern const char kErrorDomain[]; |
17 | 18 |
18 // Error values are negative. | 19 // Error values are negative. |
19 enum Error { | 20 enum Error { |
20 // No error. | 21 // No error. |
(...skipping 22 matching lines...) Expand all Loading... | |
43 | 44 |
44 // Returns a list of all the possible net error codes (not counting OK). This | 45 // 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 // 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 // an action that is represented as a net error code. |
47 // | 48 // |
48 // Note that the error codes are all positive (since histograms expect positive | 49 // Note that the error codes are all positive (since histograms expect positive |
49 // sample values). Also note that a guard bucket is created after any valid | 50 // sample values). Also note that a guard bucket is created after any valid |
50 // error code that is not followed immediately by a valid error code. | 51 // error code that is not followed immediately by a valid error code. |
51 std::vector<int> GetAllErrorCodesForUma(); | 52 std::vector<int> GetAllErrorCodesForUma(); |
52 | 53 |
54 // A convenient function to translate platform file error to net error code. | |
55 net::Error PlatformFileErrorToNetError(base::PlatformFileError file_error); | |
willchan no longer on Chromium
2012/07/24 14:45:57
No need for net:: since we're in the net namespace
nhiroki (google)
2012/07/24 16:23:03
Done.
| |
56 | |
53 } // namespace net | 57 } // namespace net |
54 | 58 |
55 #endif // NET_BASE_NET_ERRORS_H__ | 59 #endif // NET_BASE_NET_ERRORS_H__ |
OLD | NEW |