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

Unified Diff: third_party/WebKit/Source/platform/text/TextEncodingDetector.h

Issue 2648703003: Pass more hints to encoding detector. (Closed)
Patch Set: _ Created 3 years, 11 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
Index: third_party/WebKit/Source/platform/text/TextEncodingDetector.h
diff --git a/third_party/WebKit/Source/platform/text/TextEncodingDetector.h b/third_party/WebKit/Source/platform/text/TextEncodingDetector.h
index 65dce2bb6aa9ad0831c74287cb18410a6b6eb41f..e0cbab570c6bbd5e553ff7a52bac95b6d5434314 100644
--- a/third_party/WebKit/Source/platform/text/TextEncodingDetector.h
+++ b/third_party/WebKit/Source/platform/text/TextEncodingDetector.h
@@ -35,6 +35,7 @@
#include <cstddef>
namespace WTF {
+class String;
class TextEncoding;
}
@@ -44,9 +45,13 @@ namespace blink {
// hintEncodingName, detect the most likely character encoding.
// The way hintEncodingName is used is up to an implementation.
// Currently, the only caller sets it to the parent frame encoding.
+// |hintUrl| is optional. You can pass String().
+// |hintUserLanguage| is an optional language code like "fr".
PLATFORM_EXPORT bool detectTextEncoding(const char* data,
size_t length,
const char* hintEncodingName,
+ const WTF::String& hintUrl,
Jinsuk Kim 2017/01/20 21:50:47 Can this be of type const char* like other paramet
tkent 2017/01/23 00:02:57 Done.
+ const char* hintUserLanguage,
WTF::TextEncoding* detectedEncoding);
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698