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

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

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « net/base/net_error_list.h ('k') | net/base/net_errors.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 21 matching lines...) Expand all
32 32
33 // Returns a textual representation of the error code for logging purposes. 33 // Returns a textual representation of the error code for logging purposes.
34 NET_EXPORT std::string ErrorToString(int error); 34 NET_EXPORT std::string ErrorToString(int error);
35 35
36 // Same as above, but leaves off the leading "net::". 36 // Same as above, but leaves off the leading "net::".
37 NET_EXPORT std::string ErrorToShortString(int error); 37 NET_EXPORT std::string ErrorToShortString(int error);
38 38
39 // Returns true if |error| is a certificate error code. 39 // Returns true if |error| is a certificate error code.
40 NET_EXPORT bool IsCertificateError(int error); 40 NET_EXPORT bool IsCertificateError(int error);
41 41
42 // Returns true if |error| is a client certificate authentication error. This
43 // does not include ERR_SSL_PROTOCOL_ERROR which may also signal a bad client
44 // certificate.
45 NET_EXPORT bool IsClientCertificateError(int error);
46
42 // Map system error code to Error. 47 // Map system error code to Error.
43 NET_EXPORT Error MapSystemError(int os_error); 48 NET_EXPORT Error MapSystemError(int os_error);
44 49
45 // Returns a list of all the possible net error codes (not counting OK). This 50 // Returns a list of all the possible net error codes (not counting OK). This
46 // is intended for use with UMA histograms that are reporting the result of 51 // is intended for use with UMA histograms that are reporting the result of
47 // an action that is represented as a net error code. 52 // an action that is represented as a net error code.
48 // 53 //
49 // Note that the error codes are all positive (since histograms expect positive 54 // Note that the error codes are all positive (since histograms expect positive
50 // sample values). Also note that a guard bucket is created after any valid 55 // sample values). Also note that a guard bucket is created after any valid
51 // error code that is not followed immediately by a valid error code. 56 // error code that is not followed immediately by a valid error code.
52 NET_EXPORT std::vector<int> GetAllErrorCodesForUma(); 57 NET_EXPORT std::vector<int> GetAllErrorCodesForUma();
53 58
54 // A convenient function to translate file error to net error code. 59 // A convenient function to translate file error to net error code.
55 NET_EXPORT Error FileErrorToNetError(base::File::Error file_error); 60 NET_EXPORT Error FileErrorToNetError(base::File::Error file_error);
56 61
57 } // namespace net 62 } // namespace net
58 63
59 #endif // NET_BASE_NET_ERRORS_H__ 64 #endif // NET_BASE_NET_ERRORS_H__
OLDNEW
« no previous file with comments | « net/base/net_error_list.h ('k') | net/base/net_errors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698