| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. | 7 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. |
| 8 * (http://www.torchmobile.com/) | 8 * (http://www.torchmobile.com/) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 break; | 72 break; |
| 73 default: | 73 default: |
| 74 Append(buffer, c); | 74 Append(buffer, c); |
| 75 } | 75 } |
| 76 } | 76 } |
| 77 } | 77 } |
| 78 | 78 |
| 79 WTF::TextEncoding FormDataEncoder::EncodingFromAcceptCharset( | 79 WTF::TextEncoding FormDataEncoder::EncodingFromAcceptCharset( |
| 80 const String& accept_charset, | 80 const String& accept_charset, |
| 81 const WTF::TextEncoding& fallback_encoding) { | 81 const WTF::TextEncoding& fallback_encoding) { |
| 82 ASSERT(fallback_encoding.IsValid()); | 82 DCHECK(fallback_encoding.IsValid()); |
| 83 | 83 |
| 84 String normalized_accept_charset = accept_charset; | 84 String normalized_accept_charset = accept_charset; |
| 85 normalized_accept_charset.Replace(',', ' '); | 85 normalized_accept_charset.Replace(',', ' '); |
| 86 | 86 |
| 87 Vector<String> charsets; | 87 Vector<String> charsets; |
| 88 normalized_accept_charset.Split(' ', charsets); | 88 normalized_accept_charset.Split(' ', charsets); |
| 89 | 89 |
| 90 for (const String& name : charsets) { | 90 for (const String& name : charsets) { |
| 91 WTF::TextEncoding encoding(name); | 91 WTF::TextEncoding encoding(name); |
| 92 if (encoding.IsValid()) | 92 if (encoding.IsValid()) |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 AppendPercentEncoded(buffer, c); | 228 AppendPercentEncoded(buffer, c); |
| 229 } | 229 } |
| 230 } else { | 230 } else { |
| 231 AppendPercentEncoded(buffer, c); | 231 AppendPercentEncoded(buffer, c); |
| 232 } | 232 } |
| 233 } | 233 } |
| 234 } | 234 } |
| 235 } | 235 } |
| 236 | 236 |
| 237 } // namespace blink | 237 } // namespace blink |
| OLD | NEW |