Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(921)

Unified Diff: third_party/WebKit/Source/core/html/parser/TextResourceDecoder.h

Issue 2786913002: Replace the type of hint url for blink::detectTextEncoding (Closed)
Patch Set: const KURL Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/parser/TextResourceDecoder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..17cffbe428d8443f24a97037dae25d59f1282f9c 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;
Vector<char> m_buffer;
char m_hintLanguage[3];
bool m_checkedForBOM;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/parser/TextResourceDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698