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

Unified Diff: Source/core/loader/TextResourceDecoderBuilder.cpp

Issue 444113002: Remove user chosen encoding flag from DocumentLoader::createWriterFor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/loader/TextResourceDecoderBuilder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/TextResourceDecoderBuilder.cpp
diff --git a/Source/core/loader/TextResourceDecoderBuilder.cpp b/Source/core/loader/TextResourceDecoderBuilder.cpp
index 866dd2381fd9adf9aa410469ec611a77f9f0311b..624873edc914c96f5427ef58825c8902a8dd5d1c 100644
--- a/Source/core/loader/TextResourceDecoderBuilder.cpp
+++ b/Source/core/loader/TextResourceDecoderBuilder.cpp
@@ -44,10 +44,9 @@ static inline bool canReferToParentFrameEncoding(const LocalFrame* frame, const
}
-TextResourceDecoderBuilder::TextResourceDecoderBuilder(const AtomicString& mimeType, const AtomicString& encoding, bool encodingUserChoosen)
+TextResourceDecoderBuilder::TextResourceDecoderBuilder(const AtomicString& mimeType, const AtomicString& encoding)
: m_mimeType(mimeType)
, m_encoding(encoding)
- , m_encodingWasChosenByUser(encodingUserChoosen)
{
}
@@ -74,7 +73,7 @@ inline void TextResourceDecoderBuilder::setupEncoding(TextResourceDecoder* decod
parentFrame = toLocalFrame(frame->tree().parent());
if (!m_encoding.isEmpty())
- decoder->setEncoding(m_encoding.string(), m_encodingWasChosenByUser ? TextResourceDecoder::UserChosenEncoding : TextResourceDecoder::EncodingFromHTTPHeader);
+ decoder->setEncoding(m_encoding.string(), TextResourceDecoder::EncodingFromHTTPHeader);
// Set the hint encoding to the parent frame encoding only if
// the parent and the current frames share the security origin.
@@ -103,8 +102,7 @@ PassOwnPtr<TextResourceDecoder> TextResourceDecoderBuilder::buildFor(Document* d
void TextResourceDecoderBuilder::clear()
{
- if (!m_encodingWasChosenByUser)
- m_encoding = nullAtom;
+ m_encoding = nullAtom;
}
}
« no previous file with comments | « Source/core/loader/TextResourceDecoderBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698