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 // The rules for parsing content-types were borrowed from Firefox: | 5 // The rules for parsing content-types were borrowed from Firefox: |
6 // http://lxr.mozilla.org/mozilla/source/netwerk/base/src/nsURLHelper.cpp#834 | 6 // http://lxr.mozilla.org/mozilla/source/netwerk/base/src/nsURLHelper.cpp#834 |
7 | 7 |
8 #include "net/http/http_util.h" | 8 #include "net/http/http_util.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/string_number_conversions.h" | 14 #include "base/string_number_conversions.h" |
15 #include "base/string_piece.h" | |
16 #include "base/string_util.h" | 15 #include "base/string_util.h" |
17 #include "base/stringprintf.h" | 16 #include "base/stringprintf.h" |
| 17 #include "base/strings/string_piece.h" |
18 #include "base/strings/string_tokenizer.h" | 18 #include "base/strings/string_tokenizer.h" |
19 #include "base/time.h" | 19 #include "base/time.h" |
20 | 20 |
21 using std::string; | 21 using std::string; |
22 | 22 |
23 namespace net { | 23 namespace net { |
24 | 24 |
25 //----------------------------------------------------------------------------- | 25 //----------------------------------------------------------------------------- |
26 | 26 |
27 // Return the index of the closing quote of the string, if any. | 27 // Return the index of the closing quote of the string, if any. |
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 value_is_quoted_ = true; | 911 value_is_quoted_ = true; |
912 // Do not store iterators into this. See declaration of unquoted_value_. | 912 // Do not store iterators into this. See declaration of unquoted_value_. |
913 unquoted_value_ = HttpUtil::Unquote(value_begin_, value_end_); | 913 unquoted_value_ = HttpUtil::Unquote(value_begin_, value_end_); |
914 } | 914 } |
915 } | 915 } |
916 | 916 |
917 return true; | 917 return true; |
918 } | 918 } |
919 | 919 |
920 } // namespace net | 920 } // namespace net |
OLD | NEW |