Chromium Code Reviews| 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 NET_HTTP_HTTP_SECURITY_HEADERS_H_ | 5 #ifndef NET_HTTP_HTTP_SECURITY_HEADERS_H_ |
| 6 #define NET_HTTP_HTTP_SECURITY_HEADERS_H_ | 6 #define NET_HTTP_HTTP_SECURITY_HEADERS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "net/base/hash_value.h" | 14 #include "net/base/hash_value.h" |
| 15 #include "net/base/net_export.h" | 15 #include "net/base/net_export.h" |
| 16 | 16 |
| 17 class GURL; | 17 class GURL; |
| 18 | 18 |
| 19 namespace net { | 19 namespace net { |
| 20 | 20 |
| 21 const int64_t kMaxHSTSAgeSecs = 86400 * 365; // 1 year | 21 const int64_t kMaxHSTSAgeSecs = 86400 * 365; // 1 year |
| 22 const int64_t kMaxHPKPAgeSecs = 86400 * 60; // 60 days | |
|
estark
2016/02/25 21:58:04
Can you please add a comment above this line with
| |
| 22 | 23 |
| 23 // Parses |value| as a Strict-Transport-Security header value. If successful, | 24 // Parses |value| as a Strict-Transport-Security header value. If successful, |
| 24 // returns true and sets |*max_age| and |*include_subdomains|. | 25 // returns true and sets |*max_age| and |*include_subdomains|. |
| 25 // Otherwise returns false and leaves the output parameters unchanged. | 26 // Otherwise returns false and leaves the output parameters unchanged. |
| 26 // | 27 // |
| 27 // value is the right-hand side of: | 28 // value is the right-hand side of: |
| 28 // | 29 // |
| 29 // "Strict-Transport-Security" ":" | 30 // "Strict-Transport-Security" ":" |
| 30 // [ directive ] *( ";" [ directive ] ) | 31 // [ directive ] *( ";" [ directive ] ) |
| 31 bool NET_EXPORT_PRIVATE ParseHSTSHeader(const std::string& value, | 32 bool NET_EXPORT_PRIVATE ParseHSTSHeader(const std::string& value, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 // [ ";" "includeSubdomains" ] | 72 // [ ";" "includeSubdomains" ] |
| 72 // [ ";" "report-uri" "=" uri-reference ] | 73 // [ ";" "report-uri" "=" uri-reference ] |
| 73 // | 74 // |
| 74 bool NET_EXPORT_PRIVATE ParseHPKPReportOnlyHeader(const std::string& value, | 75 bool NET_EXPORT_PRIVATE ParseHPKPReportOnlyHeader(const std::string& value, |
| 75 bool* include_subdomains, | 76 bool* include_subdomains, |
| 76 HashValueVector* hashes, | 77 HashValueVector* hashes, |
| 77 GURL* report_uri); | 78 GURL* report_uri); |
| 78 } // namespace net | 79 } // namespace net |
| 79 | 80 |
| 80 #endif // NET_HTTP_HTTP_SECURITY_HEADERS_H_ | 81 #endif // NET_HTTP_HTTP_SECURITY_HEADERS_H_ |
| OLD | NEW |