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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 double max_age; | 81 double max_age; |
82 | 82 |
83 CacheControlHeader() | 83 CacheControlHeader() |
84 : parsed(false), | 84 : parsed(false), |
85 contains_no_cache(false), | 85 contains_no_cache(false), |
86 contains_no_store(false), | 86 contains_no_store(false), |
87 contains_must_revalidate(false), | 87 contains_must_revalidate(false), |
88 max_age(0.0) {} | 88 max_age(0.0) {} |
89 }; | 89 }; |
90 | 90 |
| 91 struct ServerTimingHeader { |
| 92 String metric; |
| 93 double duration; |
| 94 String description; |
| 95 |
| 96 ServerTimingHeader(String metric, double duration, String description) |
| 97 : metric(metric), duration(duration), description(description) {} |
| 98 }; |
| 99 |
| 100 using ServerTimingHeaderVector = Vector<std::unique_ptr<ServerTimingHeader>>; |
| 101 |
91 PLATFORM_EXPORT ContentDispositionType GetContentDispositionType(const String&); | 102 PLATFORM_EXPORT ContentDispositionType GetContentDispositionType(const String&); |
92 PLATFORM_EXPORT bool IsValidHTTPHeaderValue(const String&); | 103 PLATFORM_EXPORT bool IsValidHTTPHeaderValue(const String&); |
93 PLATFORM_EXPORT bool IsValidHTTPFieldContentRFC7230(const String&); | 104 PLATFORM_EXPORT bool IsValidHTTPFieldContentRFC7230(const String&); |
94 // Checks whether the given string conforms to the |token| ABNF production | 105 // Checks whether the given string conforms to the |token| ABNF production |
95 // defined in the RFC 7230 or not. | 106 // defined in the RFC 7230 or not. |
96 // | 107 // |
97 // The ABNF is for validating octets, but this method takes a String instance | 108 // The ABNF is for validating octets, but this method takes a String instance |
98 // for convenience which consists of Unicode code points. When this method sees | 109 // for convenience which consists of Unicode code points. When this method sees |
99 // non-ASCII characters, it just returns false. | 110 // non-ASCII characters, it just returns false. |
100 PLATFORM_EXPORT bool IsValidHTTPToken(const String&); | 111 PLATFORM_EXPORT bool IsValidHTTPToken(const String&); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // The following values will be outputted: | 173 // The following values will be outputted: |
163 // |*first_byte_position| = inclusive position of the first byte of the range | 174 // |*first_byte_position| = inclusive position of the first byte of the range |
164 // |*last_byte_position| = inclusive position of the last byte of the range | 175 // |*last_byte_position| = inclusive position of the last byte of the range |
165 // |*instance_length| = size in bytes of the object requested | 176 // |*instance_length| = size in bytes of the object requested |
166 // If this method returns false, then all of the outputs will be -1. | 177 // If this method returns false, then all of the outputs will be -1. |
167 PLATFORM_EXPORT bool ParseContentRangeHeaderFor206(const String& content_range, | 178 PLATFORM_EXPORT bool ParseContentRangeHeaderFor206(const String& content_range, |
168 int64_t* first_byte_position, | 179 int64_t* first_byte_position, |
169 int64_t* last_byte_position, | 180 int64_t* last_byte_position, |
170 int64_t* instance_length); | 181 int64_t* instance_length); |
171 | 182 |
| 183 PLATFORM_EXPORT std::unique_ptr<ServerTimingHeaderVector> |
| 184 ParseServerTimingHeader(const String&); |
| 185 |
| 186 PLATFORM_EXPORT String CheckDoubleQuotedString(const String&); |
| 187 |
172 } // namespace blink | 188 } // namespace blink |
173 | 189 |
174 #endif | 190 #endif |
OLD | NEW |