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

Unified Diff: Source/platform/network/HTTPParsers.cpp

Issue 27043003: Move HTTPParsers.cpp/.h to platform/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 2 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/platform/network/HTTPParsers.h ('k') | Source/web/AssociatedURLLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/network/HTTPParsers.cpp
diff --git a/Source/core/platform/network/HTTPParsers.cpp b/Source/platform/network/HTTPParsers.cpp
similarity index 98%
rename from Source/core/platform/network/HTTPParsers.cpp
rename to Source/platform/network/HTTPParsers.cpp
index c2e0867cbb59000ad9641ea0710c0ab5bb666e8f..772188d21ae5cd135882ab668c53a9a25f92c082 100644
--- a/Source/core/platform/network/HTTPParsers.cpp
+++ b/Source/platform/network/HTTPParsers.cpp
@@ -31,7 +31,7 @@
*/
#include "config.h"
-#include "core/platform/network/HTTPParsers.h"
+#include "platform/network/HTTPParsers.h"
#include "wtf/DateMath.h"
#include "wtf/text/CString.h"
@@ -199,8 +199,9 @@ bool parseHTTPRefresh(const String& refresh, bool fromHttpEquivMeta, double& del
if (refresh[urlStartPos] == '=') {
++urlStartPos;
skipWhiteSpace(refresh, urlStartPos, fromHttpEquivMeta);
- } else
- urlStartPos = pos; // e.g. "Refresh: 0; url.html"
+ } else {
+ urlStartPos = pos; // e.g. "Refresh: 0; url.html"
+ }
}
unsigned urlEndPos = len;
@@ -302,12 +303,12 @@ String extractMIMETypeFromMediaType(const String& mediaType)
String extractCharsetFromMediaType(const String& mediaType)
{
- unsigned int pos, len;
+ unsigned pos, len;
findCharsetInMediaType(mediaType, pos, len);
return mediaType.substring(pos, len);
}
-void findCharsetInMediaType(const String& mediaType, unsigned int& charsetPos, unsigned int& charsetLen, unsigned int start)
+void findCharsetInMediaType(const String& mediaType, unsigned& charsetPos, unsigned& charsetLen, unsigned start)
{
charsetPos = start;
charsetLen = 0;
@@ -562,8 +563,9 @@ size_t parseHTTPRequestLine(const char* data, size_t length, String& failureReas
space1 = p;
else if (!space2)
space2 = p;
- } else if (*p == '\n')
+ } else if (*p == '\n') {
break;
+ }
}
// Haven't finished header line.
« no previous file with comments | « Source/platform/network/HTTPParsers.h ('k') | Source/web/AssociatedURLLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698