| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2007, 2008, 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2007, 2008, 2011, 2012 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. | 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. |
| 4 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. | 4 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 namespace { | 94 namespace { |
| 95 | 95 |
| 96 class KURLCharsetConverter final : public url::CharsetConverter { | 96 class KURLCharsetConverter final : public url::CharsetConverter { |
| 97 public: | 97 public: |
| 98 // The encoding parameter may be 0, but in this case the object must not be
called. | 98 // The encoding parameter may be 0, but in this case the object must not be
called. |
| 99 explicit KURLCharsetConverter(const WTF::TextEncoding* encoding) | 99 explicit KURLCharsetConverter(const WTF::TextEncoding* encoding) |
| 100 : m_encoding(encoding) | 100 : m_encoding(encoding) |
| 101 { | 101 { |
| 102 } | 102 } |
| 103 | 103 |
| 104 virtual void ConvertFromUTF16(const url::UTF16Char* input, int inputLength,
url::CanonOutput* output) override | 104 void ConvertFromUTF16(const url::UTF16Char* input, int inputLength, url::Can
onOutput* output) override |
| 105 { | 105 { |
| 106 CString encoded = m_encoding->normalizeAndEncode(String(input, inputLeng
th), WTF::URLEncodedEntitiesForUnencodables); | 106 CString encoded = m_encoding->normalizeAndEncode(String(input, inputLeng
th), WTF::URLEncodedEntitiesForUnencodables); |
| 107 output->Append(encoded.data(), static_cast<int>(encoded.length())); | 107 output->Append(encoded.data(), static_cast<int>(encoded.length())); |
| 108 } | 108 } |
| 109 | 109 |
| 110 private: | 110 private: |
| 111 const WTF::TextEncoding* m_encoding; | 111 const WTF::TextEncoding* m_encoding; |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 } // namespace | 114 } // namespace |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 m_string = AtomicString::fromUTF8(output.data(), output.length()); | 903 m_string = AtomicString::fromUTF8(output.data(), output.length()); |
| 904 } | 904 } |
| 905 | 905 |
| 906 bool KURL::isSafeToSendToAnotherThread() const | 906 bool KURL::isSafeToSendToAnotherThread() const |
| 907 { | 907 { |
| 908 return m_string.isSafeToSendToAnotherThread() | 908 return m_string.isSafeToSendToAnotherThread() |
| 909 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread()); | 909 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread()); |
| 910 } | 910 } |
| 911 | 911 |
| 912 } // namespace blink | 912 } // namespace blink |
| OLD | NEW |