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

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

Issue 99333006: Use AtomicString type more consistently for mimeType / encoding (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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
« no previous file with comments | « Source/core/loader/TextResourceDecoderBuilder.h ('k') | Source/platform/mhtml/ArchiveResource.h » ('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 7ef6da490e2f2602e87e091069ed321e347b06ca..a9dbc01ebbf780fa306de4dfabdd176635a77990 100644
--- a/Source/core/loader/TextResourceDecoderBuilder.cpp
+++ b/Source/core/loader/TextResourceDecoderBuilder.cpp
@@ -44,7 +44,7 @@ static inline bool canReferToParentFrameEncoding(const Frame* frame, const Frame
}
-TextResourceDecoderBuilder::TextResourceDecoderBuilder(const String& mimeType, const String& encoding, bool encodingUserChoosen)
+TextResourceDecoderBuilder::TextResourceDecoderBuilder(const AtomicString& mimeType, const AtomicString& encoding, bool encodingUserChoosen)
: m_mimeType(mimeType)
, m_encoding(encoding)
, m_encodingWasChosenByUser(encodingUserChoosen)
@@ -72,7 +72,7 @@ inline void TextResourceDecoderBuilder::setupEncoding(TextResourceDecoder* decod
Frame* parentFrame = frame ? frame->tree().parent() : 0;
if (!m_encoding.isEmpty())
- decoder->setEncoding(m_encoding, m_encodingWasChosenByUser ? TextResourceDecoder::UserChosenEncoding : TextResourceDecoder::EncodingFromHTTPHeader);
+ decoder->setEncoding(m_encoding.string(), m_encodingWasChosenByUser ? TextResourceDecoder::UserChosenEncoding : TextResourceDecoder::EncodingFromHTTPHeader);
// Set the hint encoding to the parent frame encoding only if
// the parent and the current frames share the security origin.
@@ -102,7 +102,7 @@ PassOwnPtr<TextResourceDecoder> TextResourceDecoderBuilder::buildFor(Document* d
void TextResourceDecoderBuilder::clear()
{
if (!m_encodingWasChosenByUser)
- m_encoding = String();
+ m_encoding = nullAtom;
}
}
« no previous file with comments | « Source/core/loader/TextResourceDecoderBuilder.h ('k') | Source/platform/mhtml/ArchiveResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698