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 #include "net/http/http_content_disposition.h" | 5 #include "net/http/http_content_disposition.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/i18n/icu_string_conversions.h" | 8 #include "base/i18n/icu_string_conversions.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "base/sys_string_conversions.h" | 11 #include "base/sys_string_conversions.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "net/base/net_util.h" | 13 #include "net/base/net_util.h" |
14 #include "net/http/http_util.h" | 14 #include "net/http/http_util.h" |
15 #include "unicode/ucnv.h" | 15 #include "third_party/icu/public/common/unicode/ucnv.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 enum RFC2047EncodingType { | 19 enum RFC2047EncodingType { |
20 Q_ENCODING, | 20 Q_ENCODING, |
21 B_ENCODING | 21 B_ENCODING |
22 }; | 22 }; |
23 | 23 |
24 // Decodes a "Q" encoded string as described in RFC 2047 section 4.2. Similar to | 24 // Decodes a "Q" encoded string as described in RFC 2047 section 4.2. Similar to |
25 // decoding a quoted-printable string. Returns true if the input was valid. | 25 // decoding a quoted-printable string. Returns true if the input was valid. |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 | 446 |
447 if (!ext_filename.empty()) | 447 if (!ext_filename.empty()) |
448 filename_ = ext_filename; | 448 filename_ = ext_filename; |
449 else if (!filename.empty()) | 449 else if (!filename.empty()) |
450 filename_ = filename; | 450 filename_ = filename; |
451 else | 451 else |
452 filename_ = name; | 452 filename_ = name; |
453 } | 453 } |
454 | 454 |
455 } // namespace net | 455 } // namespace net |
OLD | NEW |