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

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

Issue 10808043: Factor out common error-code conversion code for PlatformFileErrorToNetError. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modified return value type. Created 8 years, 5 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
« no previous file with comments | « no previous file | net/base/net_errors.cc » ('j') | net/base/net_errors.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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
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__
OLDNEW
« no previous file with comments | « no previous file | net/base/net_errors.cc » ('j') | net/base/net_errors.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698