OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
4 * Copyright (C) 2011 Apple Inc. All Rights Reserved. | 4 * Copyright (C) 2011 Apple Inc. All Rights Reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 using CommaDelimitedHeaderSet = HashSet<String, CaseFoldingHash>; | 73 using CommaDelimitedHeaderSet = HashSet<String, CaseFoldingHash>; |
74 | 74 |
75 struct CacheControlHeader { | 75 struct CacheControlHeader { |
76 DISALLOW_NEW(); | 76 DISALLOW_NEW(); |
77 bool parsed : 1; | 77 bool parsed : 1; |
78 bool containsNoCache : 1; | 78 bool containsNoCache : 1; |
79 bool containsNoStore : 1; | 79 bool containsNoStore : 1; |
80 bool containsMustRevalidate : 1; | 80 bool containsMustRevalidate : 1; |
81 double maxAge; | 81 double maxAge; |
82 double staleWhileRevalidate; | |
83 | 82 |
84 CacheControlHeader() | 83 CacheControlHeader() |
85 : parsed(false), | 84 : parsed(false), |
86 containsNoCache(false), | 85 containsNoCache(false), |
87 containsNoStore(false), | 86 containsNoStore(false), |
88 containsMustRevalidate(false), | 87 containsMustRevalidate(false), |
89 maxAge(0.0), | 88 maxAge(0.0) {} |
90 staleWhileRevalidate(0.0) {} | |
91 }; | 89 }; |
92 | 90 |
93 PLATFORM_EXPORT ContentDispositionType getContentDispositionType(const String&); | 91 PLATFORM_EXPORT ContentDispositionType getContentDispositionType(const String&); |
94 PLATFORM_EXPORT bool isValidHTTPHeaderValue(const String&); | 92 PLATFORM_EXPORT bool isValidHTTPHeaderValue(const String&); |
95 PLATFORM_EXPORT bool isValidHTTPFieldContentRFC7230(const String&); | 93 PLATFORM_EXPORT bool isValidHTTPFieldContentRFC7230(const String&); |
96 // Checks whether the given string conforms to the |token| ABNF production | 94 // Checks whether the given string conforms to the |token| ABNF production |
97 // defined in the RFC 7230 or not. | 95 // defined in the RFC 7230 or not. |
98 // | 96 // |
99 // The ABNF is for validating octets, but this method takes a String instance | 97 // The ABNF is for validating octets, but this method takes a String instance |
100 // for convenience which consists of Unicode code points. When this method sees | 98 // for convenience which consists of Unicode code points. When this method sees |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 // |*instance_length| = size in bytes of the object requested | 165 // |*instance_length| = size in bytes of the object requested |
168 // If this method returns false, then all of the outputs will be -1. | 166 // If this method returns false, then all of the outputs will be -1. |
169 PLATFORM_EXPORT bool parseContentRangeHeaderFor206(const String& contentRange, | 167 PLATFORM_EXPORT bool parseContentRangeHeaderFor206(const String& contentRange, |
170 int64_t* firstBytePosition, | 168 int64_t* firstBytePosition, |
171 int64_t* lastBytePosition, | 169 int64_t* lastBytePosition, |
172 int64_t* instanceLength); | 170 int64_t* instanceLength); |
173 | 171 |
174 } // namespace blink | 172 } // namespace blink |
175 | 173 |
176 #endif | 174 #endif |
OLD | NEW |