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

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

Issue 2655203002: Merge "Pass more hints to encoding detector." to M57 branch (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..0ba0645d4f8e72b6d5ce255bf91140b1964cbf4c 100644
--- a/third_party/WebKit/Source/platform/text/TextEncodingDetector.h
+++ b/third_party/WebKit/Source/platform/text/TextEncodingDetector.h
@@ -44,9 +44,14 @@ 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 nullptr.
+// |hintUserLanguage| is an optional language code like "fr", and can be
+// |nullptr.
PLATFORM_EXPORT bool detectTextEncoding(const char* data,
size_t length,
const char* hintEncodingName,
+ const char* hintUrl,
+ const char* hintUserLanguage,
WTF::TextEncoding* detectedEncoding);
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698