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

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

Issue 17640007: Refactoring: Simplify DocumentWriter by reorganizing its lifetime. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Re-landing after fixing ASAN failure on set-parent-src-synchronously.xhtml. Created 7 years, 6 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') | Source/core/svg/graphics/SVGImage.cpp » ('j') | 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 ecb9ae57e5cabb1d9df8a33047d4eb48bde97f1e..1ad37828d0333ef89d92221ce49f4e8045d9045a 100644
--- a/Source/core/loader/TextResourceDecoderBuilder.cpp
+++ b/Source/core/loader/TextResourceDecoderBuilder.cpp
@@ -44,8 +44,10 @@ static inline bool canReferToParentFrameEncoding(const Frame* frame, const Frame
}
-TextResourceDecoderBuilder::TextResourceDecoderBuilder()
- : m_encodingWasChosenByUser(false)
+TextResourceDecoderBuilder::TextResourceDecoderBuilder(const String& mimeType, const String& encoding, bool encodingUserChoosen)
+ : m_mimeType(mimeType)
+ , m_encoding(encoding)
+ , m_encodingWasChosenByUser(encodingUserChoosen)
{
}
@@ -96,12 +98,6 @@ PassRefPtr<TextResourceDecoder> TextResourceDecoderBuilder::buildFor(Document* d
return decoder.release();
}
-void TextResourceDecoderBuilder::setEncoding(const String& encoding, bool userChosen)
-{
- m_encoding = encoding;
- m_encodingWasChosenByUser = userChosen;
-}
-
void TextResourceDecoderBuilder::clear()
{
if (!m_encodingWasChosenByUser)
« no previous file with comments | « Source/core/loader/TextResourceDecoderBuilder.h ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698