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

Side by Side Diff: net/http/http_util.h

Issue 9296005: Delete net::GetHeaderParamValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 25 matching lines...) Expand all
36 // strings (e.g., commas will not be treated as delimiters if they appear 36 // strings (e.g., commas will not be treated as delimiters if they appear
37 // within a quoted string). Returns the offset of the found delimiter or 37 // within a quoted string). Returns the offset of the found delimiter or
38 // line.size() if no delimiter was found. 38 // line.size() if no delimiter was found.
39 static size_t FindDelimiter(const std::string& line, 39 static size_t FindDelimiter(const std::string& line,
40 size_t search_start, 40 size_t search_start,
41 char delimiter); 41 char delimiter);
42 42
43 // Parses the value of a Content-Type header. The resulting mime_type and 43 // Parses the value of a Content-Type header. The resulting mime_type and
44 // charset values are normalized to lowercase. The mime_type and charset 44 // charset values are normalized to lowercase. The mime_type and charset
45 // output values are only modified if the content_type_str contains a mime 45 // output values are only modified if the content_type_str contains a mime
46 // type and charset value, respectively. 46 // type and charset value, respectively.
asanka 2012/01/27 16:18:59 Can you add a comment explaining the |boundary| pa
47 static void ParseContentType(const std::string& content_type_str, 47 static void ParseContentType(const std::string& content_type_str,
48 std::string* mime_type, 48 std::string* mime_type,
49 std::string* charset, 49 std::string* charset,
50 bool* had_charset); 50 bool* had_charset,
51 std::string* boundary);
51 52
52 // Scans the headers and look for the first "Range" header in |headers|, 53 // Scans the headers and look for the first "Range" header in |headers|,
53 // if "Range" exists and the first one of it is well formatted then returns 54 // if "Range" exists and the first one of it is well formatted then returns
54 // true, |ranges| will contain a list of valid ranges. If return 55 // true, |ranges| will contain a list of valid ranges. If return
55 // value is false then values in |ranges| should not be used. The format of 56 // value is false then values in |ranges| should not be used. The format of
56 // "Range" header is defined in RFC 2616 Section 14.35.1. 57 // "Range" header is defined in RFC 2616 Section 14.35.1.
57 // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1 58 // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1
58 static bool ParseRanges(const std::string& headers, 59 static bool ParseRanges(const std::string& headers,
59 std::vector<HttpByteRange>* ranges); 60 std::vector<HttpByteRange>* ranges);
60 61
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 // into the original's unquoted_value_ member. 333 // into the original's unquoted_value_ member.
333 std::string unquoted_value_; 334 std::string unquoted_value_;
334 335
335 bool value_is_quoted_; 336 bool value_is_quoted_;
336 }; 337 };
337 }; 338 };
338 339
339 } // namespace net 340 } // namespace net
340 341
341 #endif // NET_HTTP_HTTP_UTIL_H_ 342 #endif // NET_HTTP_HTTP_UTIL_H_
OLDNEW
« no previous file with comments | « net/http/http_response_headers.cc ('k') | net/http/http_util.cc » ('j') | net/http/http_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698