OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_CERT_INTERNAL_CERT_ERROR_PARAMS_H_ | 5 #ifndef NET_CERT_INTERNAL_CERT_ERROR_PARAMS_H_ |
6 #define NET_CERT_INTERNAL_CERT_ERROR_PARAMS_H_ | 6 #define NET_CERT_INTERNAL_CERT_ERROR_PARAMS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... | |
36 // structure, should they be needed for non-pretty-printing use cases. | 36 // structure, should they be needed for non-pretty-printing use cases. |
37 | 37 |
38 private: | 38 private: |
39 DISALLOW_COPY_AND_ASSIGN(CertErrorParams); | 39 DISALLOW_COPY_AND_ASSIGN(CertErrorParams); |
40 }; | 40 }; |
41 | 41 |
42 // TODO(crbug.com/634443): Should the underlying parameter classes be exposed | 42 // TODO(crbug.com/634443): Should the underlying parameter classes be exposed |
43 // so error consumers can access their data directly? (Without having to go | 43 // so error consumers can access their data directly? (Without having to go |
44 // through the generic virtuals). | 44 // through the generic virtuals). |
45 | 45 |
46 // Creates a parameter object that holds a copy of |der1|, and names it |name1| | 46 // Creates a parameter object that holds a copy of |der|, and names it |name| |
47 // in debug string outputs. | 47 // in debug string outputs. |
48 NET_EXPORT std::unique_ptr<CertErrorParams> CreateCertErrorParams1Der( | 48 NET_EXPORT std::unique_ptr<CertErrorParams> CreateCertErrorParams1Der( |
49 const char* name1, | 49 const char* name, |
50 const der::Input& der1); | 50 const der::Input& der); |
51 | 51 |
52 // Same as CreateCertErrorParams1Der() but has a second DER blob. | 52 // Same as CreateCertErrorParams1Der() but has a second DER blob. |
53 NET_EXPORT std::unique_ptr<CertErrorParams> CreateCertErrorParams2Der( | 53 NET_EXPORT std::unique_ptr<CertErrorParams> CreateCertErrorParams2Der( |
54 const char* name1, | 54 const char* name1, |
55 const der::Input& der1, | 55 const der::Input& der1, |
56 const char* name2, | 56 const char* name2, |
57 const der::Input& der2); | 57 const der::Input& der2); |
58 | 58 |
59 // Creates a parameter object that holds a single size_t value. |name| is used | 59 // Creates a parameter object that holds a single size_t value. |name| is used |
60 // when pretty-printing the parameters. | 60 // when pretty-printing the parameters. |
61 NET_EXPORT std::unique_ptr<CertErrorParams> CreateCertErrorParamsSizeT( | 61 NET_EXPORT std::unique_ptr<CertErrorParams> CreateCertErrorParamsSizeT( |
62 const char* name, | 62 const char* name, |
63 size_t value); | 63 size_t value); |
64 | 64 |
65 // Same as CreateCertErrorParamsSizeT() but has a second size_t. | |
66 NET_EXPORT std::unique_ptr<CertErrorParams> CreateCertErrorParamsSizeT( | |
mattm
2016/09/19 19:48:59
should decide on a consistent style (the der Creat
eroman
2016/09/19 20:13:17
Done.
| |
67 const char* name1, | |
68 size_t value1, | |
69 const char* name2, | |
70 size_t value2); | |
71 | |
65 } // namespace net | 72 } // namespace net |
66 | 73 |
67 #endif // NET_CERT_INTERNAL_CERT_ERROR_PARAMS_H_ | 74 #endif // NET_CERT_INTERNAL_CERT_ERROR_PARAMS_H_ |
OLD | NEW |