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

Side by Side Diff: content/common/ssl_status_serialization.h

Issue 1259253009: Revert of Attach a SecurityStyle to each request in ResourceLoader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « content/browser/ssl/ssl_policy.cc ('k') | content/common/ssl_status_serialization.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 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 13
14 namespace content { 14 namespace content {
15 15
16 // Serializes the given security info. Does NOT include 16 // Serializes the given security info.
17 // |ssl_status.content_status| in the serialized info. 17 CONTENT_EXPORT std::string SerializeSecurityInfo(
18 CONTENT_EXPORT std::string SerializeSecurityInfo(const SSLStatus& ssl_status); 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);
19 24
20 // Deserializes the given security info into |ssl_status|. Note that 25 // Deserializes the given security info into |ssl_status|. Note that
21 // this returns the |content_status| field with its default 26 // this returns the SecurityStyle and ContentStatus fields with default
22 // value. Returns true on success and false if the state couldn't be 27 // values. 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 28 // deserialized. If false, all fields in |ssl_status| will be set to their
24 // their default values. Note that this function does not validate that 29 // default values.
25 // the deserialized SSLStatus is internally consistent (e.g. that the
26 // |security_style| matches up with the rest of the fields).
27 bool CONTENT_EXPORT 30 bool CONTENT_EXPORT
28 DeserializeSecurityInfo(const std::string& state, 31 DeserializeSecurityInfo(const std::string& state,
29 SSLStatus* ssl_status) WARN_UNUSED_RESULT; 32 SSLStatus* ssl_status) WARN_UNUSED_RESULT;
30 33
31 } // namespace content 34 } // namespace content
32 35
33 #endif // CONTENT_COMMON_SSL_STATUS_SERIALIZATION_H_ 36 #endif // CONTENT_COMMON_SSL_STATUS_SERIALIZATION_H_
OLDNEW
« no previous file with comments | « content/browser/ssl/ssl_policy.cc ('k') | content/common/ssl_status_serialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698