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

Unified Diff: net/http/http_security_headers.h

Issue 12974003: Improve TransportSecurityState data storage. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/transport_security_state_static_generate.go ('k') | net/http/http_security_headers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_security_headers.h
===================================================================
--- net/http/http_security_headers.h (revision 186438)
+++ net/http/http_security_headers.h (working copy)
@@ -19,23 +19,20 @@
const int64 kMaxHSTSAgeSecs = 86400 * 365; // 1 year
// Parses |value| as a Strict-Transport-Security header value. If successful,
-// returns true and sets |*expiry| and |*include_subdomains|.
+// returns true and sets |*max_age| and |*include_subdomains|.
// Otherwise returns false and leaves the output parameters unchanged.
-// Interprets the max-age directive relative to |now|.
//
// value is the right-hand side of:
//
// "Strict-Transport-Security" ":"
// [ directive ] *( ";" [ directive ] )
-bool NET_EXPORT_PRIVATE ParseHSTSHeader(const base::Time& now,
- const std::string& value,
- base::Time* expiry,
+bool NET_EXPORT_PRIVATE ParseHSTSHeader(const std::string& value,
+ base::TimeDelta* max_age,
bool* include_subdomains);
// Parses |value| as a Public-Key-Pins header value. If successful,
-// returns true and populates the expiry and hashes values.
+// returns true and populates the |*max_age| and hashes values.
// Otherwise returns false and leaves the output parameters unchanged.
-// Interprets the max-age directive relative to |now|.
//
// value is the right-hand side of:
//
@@ -49,10 +46,9 @@
// (as specified by the chain_hashes) parameter. In addition, there MUST
// be at least one key hash which does NOT match the site's SSL certificate
// chain (this is the "backup pin").
-bool NET_EXPORT_PRIVATE ParseHPKPHeader(const base::Time& now,
- const std::string& value,
+bool NET_EXPORT_PRIVATE ParseHPKPHeader(const std::string& value,
const HashValueVector& chain_hashes,
- base::Time* expiry,
+ base::TimeDelta* max_age,
HashValueVector* hashes);
} // namespace net
« no previous file with comments | « net/base/transport_security_state_static_generate.go ('k') | net/http/http_security_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698