OLD | NEW |
---|---|
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 CONTENT_COMMON_SSL_STATUS_SERIALIZATION_H_ | 5 #ifndef CONTENT_COMMON_SSL_STATUS_SERIALIZATION_H_ |
6 #define CONTENT_COMMON_SSL_STATUS_SERIALIZATION_H_ | 6 #define CONTENT_COMMON_SSL_STATUS_SERIALIZATION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "content/public/common/ssl_status.h" | 12 #include "content/public/common/ssl_status.h" |
13 #include "net/cert/signed_certificate_timestamp.h" | |
Eran Messeri
2016/03/09 20:58:47
Not sure ,why the include if you're not using it?
dwaxweiler
2016/03/10 11:02:28
Acknowledged.
| |
13 | 14 |
14 namespace content { | 15 namespace content { |
15 | 16 |
16 // Serializes the given security info. Does NOT include | 17 // Serializes the given security info. Does NOT include |
17 // |ssl_status.content_status| in the serialized info. | 18 // |ssl_status.content_status| in the serialized info. |
18 CONTENT_EXPORT std::string SerializeSecurityInfo(const SSLStatus& ssl_status); | 19 CONTENT_EXPORT std::string SerializeSecurityInfo(const SSLStatus& ssl_status); |
19 | 20 |
20 // Deserializes the given security info into |ssl_status|. Note that | 21 // Deserializes the given security info into |ssl_status|. Note that |
21 // this returns the |content_status| field with its default | 22 // this returns the |content_status| field with its default |
22 // value. Returns true on success and false if the state couldn't be | 23 // value. Returns true on success and false if the state couldn't be |
23 // deserialized. If false, all fields in |ssl_status| will be set to | 24 // deserialized. If false, all fields in |ssl_status| will be set to |
24 // their default values. Note that this function does not validate that | 25 // their default values. Note that this function does not validate that |
25 // the deserialized SSLStatus is internally consistent (e.g. that the | 26 // the deserialized SSLStatus is internally consistent (e.g. that the |
26 // |security_style| matches up with the rest of the fields). | 27 // |security_style| matches up with the rest of the fields). |
27 bool CONTENT_EXPORT | 28 bool CONTENT_EXPORT |
28 DeserializeSecurityInfo(const std::string& state, | 29 DeserializeSecurityInfo(const std::string& state, |
29 SSLStatus* ssl_status) WARN_UNUSED_RESULT; | 30 SSLStatus* ssl_status) WARN_UNUSED_RESULT; |
30 | 31 |
31 } // namespace content | 32 } // namespace content |
32 | 33 |
33 #endif // CONTENT_COMMON_SSL_STATUS_SERIALIZATION_H_ | 34 #endif // CONTENT_COMMON_SSL_STATUS_SERIALIZATION_H_ |
OLD | NEW |