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

Unified Diff: third_party/WebKit/Source/core/html/parser/TextResourceDecoder.cpp

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 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
Index: third_party/WebKit/Source/core/html/parser/TextResourceDecoder.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/TextResourceDecoder.cpp b/third_party/WebKit/Source/core/html/parser/TextResourceDecoder.cpp
index 0cb7f72ad11270dcfb4c8c825335c3fd1cb33b3b..04ec94b583d03317cbc076c1ecfff4252f78d5ee 100644
--- a/third_party/WebKit/Source/core/html/parser/TextResourceDecoder.cpp
+++ b/third_party/WebKit/Source/core/html/parser/TextResourceDecoder.cpp
@@ -434,7 +434,7 @@ String TextResourceDecoder::decode(const char* data, size_t len) {
if (!m_checkedForBOM) {
DCHECK_EQ(0u, lengthOfBOM);
m_buffer.append(data, len);
- return emptyString();
+ return emptyString;
}
}
DCHECK_LE(lengthOfBOM, m_buffer.size() + len);
@@ -443,7 +443,7 @@ String TextResourceDecoder::decode(const char* data, size_t len) {
if (m_contentType == CSSContent && !m_checkedForCSSCharset) {
if (!checkForCSSCharset(data, len, movedDataToBuffer))
- return emptyString();
+ return emptyString;
}
// We check XML declaration in HTML content only if there is enough data
@@ -452,7 +452,7 @@ String TextResourceDecoder::decode(const char* data, size_t len) {
m_contentType == XMLContent) &&
!m_checkedForXMLCharset) {
if (!checkForXMLCharset(data, len, movedDataToBuffer))
- return emptyString();
+ return emptyString;
}
const char* dataForDecode = data + lengthOfBOM;

Powered by Google App Engine
This is Rietveld 408576698