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