Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/parser/TextResourceDecoder.h |
| diff --git a/third_party/WebKit/Source/core/html/parser/TextResourceDecoder.h b/third_party/WebKit/Source/core/html/parser/TextResourceDecoder.h |
| index a7cc4e80f682d482ff2e5e4cacdff3092f3e739e..2d929736b1b3fcab37bc2440d7dcb9c2a431d37f 100644 |
| --- a/third_party/WebKit/Source/core/html/parser/TextResourceDecoder.h |
| +++ b/third_party/WebKit/Source/core/html/parser/TextResourceDecoder.h |
| @@ -23,10 +23,11 @@ |
| #ifndef TextResourceDecoder_h |
| #define TextResourceDecoder_h |
| +#include <memory> |
| #include "core/CoreExport.h" |
| +#include "platform/weborigin/KURL.h" |
| #include "wtf/PtrUtil.h" |
| #include "wtf/text/TextEncoding.h" |
| -#include <memory> |
| namespace blink { |
| @@ -52,13 +53,13 @@ class CORE_EXPORT TextResourceDecoder { |
| const String& mimeType, |
| const WTF::TextEncoding& defaultEncoding = WTF::TextEncoding()) { |
| return WTF::wrapUnique(new TextResourceDecoder( |
| - mimeType, defaultEncoding, UseContentAndBOMBasedDetection, String())); |
| + mimeType, defaultEncoding, UseContentAndBOMBasedDetection, KURL())); |
| } |
| static std::unique_ptr<TextResourceDecoder> createWithAutoDetection( |
| const String& mimeType, |
| const WTF::TextEncoding& defaultEncoding, |
| - const String& url) { |
| + const KURL& url) { |
| return WTF::wrapUnique(new TextResourceDecoder(mimeType, defaultEncoding, |
| UseAllAutoDetection, url)); |
| } |
| @@ -67,7 +68,7 @@ class CORE_EXPORT TextResourceDecoder { |
| // https://encoding.spec.whatwg.org/#utf-8-decode. |
| static std::unique_ptr<TextResourceDecoder> createAlwaysUseUTF8ForText() { |
| return WTF::wrapUnique(new TextResourceDecoder( |
| - "plain/text", UTF8Encoding(), AlwaysUseUTF8ForText, String())); |
| + "plain/text", UTF8Encoding(), AlwaysUseUTF8ForText, KURL())); |
| } |
| ~TextResourceDecoder(); |
| @@ -113,7 +114,7 @@ class CORE_EXPORT TextResourceDecoder { |
| TextResourceDecoder(const String& mimeType, |
| const WTF::TextEncoding& defaultEncoding, |
| EncodingDetectionOption, |
| - const String& url); |
| + const KURL& hintUrl); |
| private: |
| enum ContentType { |
| @@ -137,7 +138,7 @@ class CORE_EXPORT TextResourceDecoder { |
| std::unique_ptr<TextCodec> m_codec; |
| EncodingSource m_source; |
| const char* m_hintEncoding; |
| - const CString m_hintUrl; |
| + const KURL& m_hintUrl; |
|
tkent
2017/03/31 00:47:30
This should be |const KURL|, not |const KURL&|. Th
Jinsuk Kim
2017/03/31 01:33:29
Oops. You're correct. Then we have to create a new
tkent
2017/03/31 08:12:24
I think this CL is still worth to land. Copying c
Jinsuk Kim
2017/04/02 22:46:10
Done.
|
| Vector<char> m_buffer; |
| char m_hintLanguage[3]; |
| bool m_checkedForBOM; |