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

Unified Diff: Source/core/xml/XMLHttpRequest.cpp

Issue 333143003: Fix style errors in core/xml/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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/xml/XMLHttpRequest.h ('k') | Source/core/xml/XMLHttpRequestProgressEventThrottle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XMLHttpRequest.cpp
diff --git a/Source/core/xml/XMLHttpRequest.cpp b/Source/core/xml/XMLHttpRequest.cpp
index fb7e95aad6d2a48fed85a7e5a8f3bb4b1191c832..1d1c58056583a774c5898b0b6359af2fd9a9258f 100644
--- a/Source/core/xml/XMLHttpRequest.cpp
+++ b/Source/core/xml/XMLHttpRequest.cpp
@@ -717,10 +717,11 @@ void XMLHttpRequest::send(Blob* body, ExceptionState& exceptionState)
if (areMethodAndURLValidForSend()) {
if (getRequestHeader("Content-Type").isEmpty()) {
const String& blobType = body->type();
- if (!blobType.isEmpty() && isValidContentType(blobType))
+ if (!blobType.isEmpty() && isValidContentType(blobType)) {
setRequestHeaderInternal("Content-Type", AtomicString(blobType));
- else {
- // From FileAPI spec, whenever media type cannot be determined, empty string must be returned.
+ } else {
+ // From FileAPI spec, whenever media type cannot be determined,
+ // empty string must be returned.
setRequestHeaderInternal("Content-Type", "");
}
}
@@ -1345,19 +1346,22 @@ void XMLHttpRequest::didReceiveData(const char* data, int len)
bool useDecoder = m_responseTypeCode == ResponseTypeDefault || m_responseTypeCode == ResponseTypeText || m_responseTypeCode == ResponseTypeJSON || m_responseTypeCode == ResponseTypeDocument;
if (useDecoder && !m_decoder) {
- if (m_responseTypeCode == ResponseTypeJSON)
+ if (m_responseTypeCode == ResponseTypeJSON) {
m_decoder = TextResourceDecoder::create("application/json", "UTF-8");
- else if (!m_responseEncoding.isEmpty())
+ } else if (!m_responseEncoding.isEmpty()) {
m_decoder = TextResourceDecoder::create("text/plain", m_responseEncoding);
// allow TextResourceDecoder to look inside the m_response if it's XML or HTML
- else if (responseIsXML()) {
+ } else if (responseIsXML()) {
m_decoder = TextResourceDecoder::create("application/xml");
- // Don't stop on encoding errors, unlike it is done for other kinds of XML resources. This matches the behavior of previous WebKit versions, Firefox and Opera.
+ // Don't stop on encoding errors, unlike it is done for other kinds
+ // of XML resources. This matches the behavior of previous WebKit
+ // versions, Firefox and Opera.
m_decoder->useLenientXMLDecoding();
- } else if (equalIgnoringCase(responseMIMEType(), "text/html"))
+ } else if (equalIgnoringCase(responseMIMEType(), "text/html")) {
m_decoder = TextResourceDecoder::create("text/html", "UTF-8");
- else
+ } else {
m_decoder = TextResourceDecoder::create("text/plain", "UTF-8");
+ }
}
if (!len)
« no previous file with comments | « Source/core/xml/XMLHttpRequest.h ('k') | Source/core/xml/XMLHttpRequestProgressEventThrottle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698