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_UTIL_H_ | 5 #ifndef NET_HTTP_HTTP_UTIL_H_ |
6 #define NET_HTTP_HTTP_UTIL_H_ | 6 #define NET_HTTP_HTTP_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
191 | 191 |
192 // Gets a vector of common HTTP status codes for histograms of status | 192 // Gets a vector of common HTTP status codes for histograms of status |
193 // codes. Currently returns everything in the range [100, 600), plus 0 | 193 // codes. Currently returns everything in the range [100, 600), plus 0 |
194 // (for invalid responses/status codes). | 194 // (for invalid responses/status codes). |
195 static std::vector<int> GetStatusCodesForHistogram(); | 195 static std::vector<int> GetStatusCodesForHistogram(); |
196 | 196 |
197 // Maps an HTTP status code to one of the status codes in the vector | 197 // Maps an HTTP status code to one of the status codes in the vector |
198 // returned by GetStatusCodesForHistogram. | 198 // returned by GetStatusCodesForHistogram. |
199 static int MapStatusCodeForHistogram(int code); | 199 static int MapStatusCodeForHistogram(int code); |
200 | 200 |
201 // Returns true if the URL scheme is "ws" or "wss". | |
202 static bool SchemeIsWsOrWss(const GURL& url); | |
yhirano
2013/11/18 04:14:07
[optional] Using this function in http_auth_handle
yhirano
2013/11/18 04:32:36
might by => might be
Sorry!
| |
203 | |
201 // Used to iterate over the name/value pairs of HTTP headers. To iterate | 204 // Used to iterate over the name/value pairs of HTTP headers. To iterate |
202 // over the values in a multi-value header, use ValuesIterator. | 205 // over the values in a multi-value header, use ValuesIterator. |
203 // See AssembleRawHeaders for joining line continuations (this iterator | 206 // See AssembleRawHeaders for joining line continuations (this iterator |
204 // does not expect any). | 207 // does not expect any). |
205 class NET_EXPORT HeadersIterator { | 208 class NET_EXPORT HeadersIterator { |
206 public: | 209 public: |
207 HeadersIterator(std::string::const_iterator headers_begin, | 210 HeadersIterator(std::string::const_iterator headers_begin, |
208 std::string::const_iterator headers_end, | 211 std::string::const_iterator headers_end, |
209 const std::string& line_delimiter); | 212 const std::string& line_delimiter); |
210 ~HeadersIterator(); | 213 ~HeadersIterator(); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
350 // into the original's unquoted_value_ member. | 353 // into the original's unquoted_value_ member. |
351 std::string unquoted_value_; | 354 std::string unquoted_value_; |
352 | 355 |
353 bool value_is_quoted_; | 356 bool value_is_quoted_; |
354 }; | 357 }; |
355 }; | 358 }; |
356 | 359 |
357 } // namespace net | 360 } // namespace net |
358 | 361 |
359 #endif // NET_HTTP_HTTP_UTIL_H_ | 362 #endif // NET_HTTP_HTTP_UTIL_H_ |
OLD | NEW |