Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / content / common / ssl_status_serialization.h
blob08819d336277969f85daae266919e0871597d02f
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_COMMON_SSL_STATUS_SERIALIZATION_H_
6 #define CONTENT_COMMON_SSL_STATUS_SERIALIZATION_H_
8 #include <string>
10 #include "base/compiler_specific.h"
11 #include "content/common/content_export.h"
12 #include "content/public/common/ssl_status.h"
14 namespace content {
16 // Serializes the given security info.
17 CONTENT_EXPORT std::string SerializeSecurityInfo(
18 int cert_id,
19 net::CertStatus cert_status,
20 int security_bits,
21 int connection_status,
22 const SignedCertificateTimestampIDStatusList&
23 signed_certificate_timestamp_ids);
25 // Deserializes the given security info into |ssl_status|. Note that
26 // this returns the SecurityStyle and ContentStatus fields with default
27 // values. Returns true on success and false if the state couldn't be
28 // deserialized. If false, all fields in |ssl_status| will be set to their
29 // default values.
30 bool CONTENT_EXPORT
31 DeserializeSecurityInfo(const std::string& state,
32 SSLStatus* ssl_status) WARN_UNUSED_RESULT;
34 } // namespace content
36 #endif // CONTENT_COMMON_SSL_STATUS_SERIALIZATION_H_