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

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

Issue 133273007: Revert "Moved text decoding to the parser thread" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/DocumentEncodingData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DocumentEncodingData.h
diff --git a/Source/core/dom/DocumentEncodingData.h b/Source/core/dom/DocumentEncodingData.h
index 2016aa531ae3fa5f8a856381cca6509e7b1e5269..5a696afdd1757e42b42e6313b8919e6193f333b8 100644
--- a/Source/core/dom/DocumentEncodingData.h
+++ b/Source/core/dom/DocumentEncodingData.h
@@ -34,31 +34,19 @@
#include "wtf/text/TextEncoding.h"
namespace WebCore {
-class TextResourceDecoder;
-class DocumentEncodingData {
-public:
- DocumentEncodingData();
- explicit DocumentEncodingData(const TextResourceDecoder&);
+struct DocumentEncodingData {
+ DocumentEncodingData()
+ : wasDetectedHeuristically(false)
+ , sawDecodingError(false)
+ {
+ }
- const WTF::TextEncoding& encoding() const { return m_encoding; }
- void setEncoding(const WTF::TextEncoding&);
- bool wasDetectedHeuristically() const { return m_wasDetectedHeuristically; }
- bool sawDecodingError() const { return m_sawDecodingError; }
-
-private:
- WTF::TextEncoding m_encoding;
- bool m_wasDetectedHeuristically;
- bool m_sawDecodingError;
+ WTF::TextEncoding encoding;
+ bool wasDetectedHeuristically;
+ bool sawDecodingError;
};
-inline bool operator!=(const DocumentEncodingData& a, const DocumentEncodingData& b)
-{
- return a.encoding() != b.encoding()
- || a.wasDetectedHeuristically() != b.wasDetectedHeuristically()
- || a.sawDecodingError() != b.sawDecodingError();
-}
-
} // namespace WebCore
#endif // DocumentEncodingData_h
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/DocumentEncodingData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698