Lines Matching refs:string

9 #include <string>
17 // This is a macro to support extending this string literal at compile time.
29 static std::string PathForRequest(const GURL& url);
34 static std::string SpecForRequest(const GURL& url);
38 // within a quoted string). Returns the offset of the found delimiter or
40 static size_t FindDelimiter(const std::string& line,
48 static void ParseContentType(const std::string& content_type_str,
49 std::string* mime_type,
50 std::string* charset,
59 static bool ParseRanges(const std::string& headers,
63 // is directly passed in, rather than requiring searching through a string.
64 static bool ParseRangeHeader(const std::string& range_specifier,
70 static bool HasHeader(const std::string& headers, const char* name);
76 static std::string StripHeaders(const std::string& headers,
83 static bool IsNonCoalescingHeader(std::string::const_iterator name_begin,
84 std::string::const_iterator name_end);
85 static bool IsNonCoalescingHeader(const std::string& name) {
94 // Trim HTTP_LWS chars from the beginning and end of the string.
95 static void TrimLWS(std::string::const_iterator* begin,
96 std::string::const_iterator* end);
102 // quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
103 // Unquote() strips the surrounding quotemarks off a string, and unescapes
104 // any quoted-pair to obtain the value contained by the quoted-string.
106 static std::string Unquote(std::string::const_iterator begin,
107 std::string::const_iterator end);
110 static std::string Unquote(const std::string& str);
113 static std::string Quote(const std::string& str);
133 static std::string AssembleRawHeaders(const char* buf, int buf_len);
149 static std::string GenerateAcceptLanguageHeader(
150 const std::string& raw_language_list);
155 static std::string GenerateAcceptCharsetHeader(const std::string& charset);
160 const std::string& header_value,
161 std::string* headers);
169 HeadersIterator(std::string::const_iterator headers_begin,
170 std::string::const_iterator headers_end,
171 const std::string& line_delimiter);
191 std::string::const_iterator name_begin() const {
194 std::string::const_iterator name_end() const {
197 std::string name() const {
198 return std::string(name_begin_, name_end_);
201 std::string::const_iterator values_begin() const {
204 std::string::const_iterator values_end() const {
207 std::string values() const {
208 return std::string(values_begin_, values_end_);
213 std::string::const_iterator name_begin_;
214 std::string::const_iterator name_end_;
215 std::string::const_iterator values_begin_;
216 std::string::const_iterator values_end_;
228 // quoted string.
232 ValuesIterator(std::string::const_iterator values_begin,
233 std::string::const_iterator values_end,
241 std::string::const_iterator value_begin() const {
244 std::string::const_iterator value_end() const {
247 std::string value() const {
248 return std::string(value_begin_, value_end_);
253 std::string::const_iterator value_begin_;
254 std::string::const_iterator value_end_;
259 // token or quoted-string (the value). Arbitrary HTTP LWS is permitted outside
266 NameValuePairsIterator(std::string::const_iterator begin,
267 std::string::const_iterator end,
280 std::string::const_iterator name_begin() const { return name_begin_; }
281 std::string::const_iterator name_end() const { return name_end_; }
282 std::string name() const { return std::string(name_begin_, name_end_); }
285 std::string::const_iterator value_begin() const {
288 std::string::const_iterator value_end() const {
291 std::string value() const {
292 return value_is_quoted_ ? unquoted_value_ : std::string(value_begin_,
300 std::string::const_iterator begin_;
301 std::string::const_iterator end_;
303 std::string::const_iterator name_begin_;
304 std::string::const_iterator name_end_;
306 std::string::const_iterator value_begin_;
307 std::string::const_iterator value_end_;
309 // Do not store iterators into this string. The NameValuePairsIterator
312 std::string unquoted_value_;