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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 } | 329 } |
330 | 330 |
331 // The value before unquoting (if any). | 331 // The value before unquoting (if any). |
332 std::string raw_value() const { return std::string(value_begin_, | 332 std::string raw_value() const { return std::string(value_begin_, |
333 value_end_); } | 333 value_end_); } |
334 | 334 |
335 private: | 335 private: |
336 HttpUtil::ValuesIterator props_; | 336 HttpUtil::ValuesIterator props_; |
337 bool valid_; | 337 bool valid_; |
338 | 338 |
339 std::string::const_iterator begin_; | |
340 std::string::const_iterator end_; | |
341 | |
342 std::string::const_iterator name_begin_; | 339 std::string::const_iterator name_begin_; |
343 std::string::const_iterator name_end_; | 340 std::string::const_iterator name_end_; |
344 | 341 |
345 std::string::const_iterator value_begin_; | 342 std::string::const_iterator value_begin_; |
346 std::string::const_iterator value_end_; | 343 std::string::const_iterator value_end_; |
347 | 344 |
348 // Do not store iterators into this string. The NameValuePairsIterator | 345 // Do not store iterators into this string. The NameValuePairsIterator |
349 // is copyable/assignable, and if copied the copy's iterators would point | 346 // is copyable/assignable, and if copied the copy's iterators would point |
350 // into the original's unquoted_value_ member. | 347 // into the original's unquoted_value_ member. |
351 std::string unquoted_value_; | 348 std::string unquoted_value_; |
352 | 349 |
353 bool value_is_quoted_; | 350 bool value_is_quoted_; |
354 }; | 351 }; |
355 }; | 352 }; |
356 | 353 |
357 } // namespace net | 354 } // namespace net |
358 | 355 |
359 #endif // NET_HTTP_HTTP_UTIL_H_ | 356 #endif // NET_HTTP_HTTP_UTIL_H_ |
OLD | NEW |