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

Unified Diff: third_party/WebKit/Source/core/dom/DocumentEncodingData.h

Issue 1456843002: Finch experiment: auto-detect text encoding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 5 years 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/core/dom/DocumentEncodingData.h
diff --git a/third_party/WebKit/Source/core/dom/DocumentEncodingData.h b/third_party/WebKit/Source/core/dom/DocumentEncodingData.h
index 6682cc806e03e8913923a8048cdcb9e406cdaf93..e0e6f37d137b0406188f252e4d389b9c31687a72 100644
--- a/third_party/WebKit/Source/core/dom/DocumentEncodingData.h
+++ b/third_party/WebKit/Source/core/dom/DocumentEncodingData.h
@@ -48,10 +48,14 @@ public:
void setEncoding(const WTF::TextEncoding&);
bool wasDetectedHeuristically() const { return m_wasDetectedHeuristically; }
bool sawDecodingError() const { return m_sawDecodingError; }
+ bool attemptedToDetermineEncodingFromContentSniffing() const { return m_attemptedToDetermineEncodingFromContentSniffing; }
+ bool encodingWasDetectedFromContentSniffing() const { return m_encodingWasDetectedFromContentSniffing; }
private:
WTF::TextEncoding m_encoding;
bool m_wasDetectedHeuristically;
+ bool m_attemptedToDetermineEncodingFromContentSniffing;
+ bool m_encodingWasDetectedFromContentSniffing;
bool m_sawDecodingError;
};
@@ -62,6 +66,8 @@ inline bool operator!=(const DocumentEncodingData& a, const DocumentEncodingData
{
return a.encoding() != b.encoding()
|| a.wasDetectedHeuristically() != b.wasDetectedHeuristically()
+ || a.attemptedToDetermineEncodingFromContentSniffing() != b.attemptedToDetermineEncodingFromContentSniffing()
+ || a.encodingWasDetectedFromContentSniffing() != b.encodingWasDetectedFromContentSniffing()
|| a.sawDecodingError() != b.sawDecodingError();
}

Powered by Google App Engine
This is Rietveld 408576698