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

Unified Diff: net/http/http_chunked_decoder.cc

Issue 193072: Move StringPiece into the base namespace. It is colliding (Closed)
Patch Set: take 2 Created 11 years, 3 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 | « net/base/registry_controlled_domain.cc ('k') | net/http/http_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_chunked_decoder.cc
diff --git a/net/http/http_chunked_decoder.cc b/net/http/http_chunked_decoder.cc
index 71f755429a05a3f58b729ea097951f50bf4657a6..25b789f33d0cb374ce8038d4067933b5081f234a 100644
--- a/net/http/http_chunked_decoder.cc
+++ b/net/http/http_chunked_decoder.cc
@@ -93,8 +93,8 @@ int HttpChunkedDecoder::ScanForChunkRemaining(const char* buf, int buf_len) {
int bytes_consumed = 0;
- size_t index_of_lf = StringPiece(buf, buf_len).find('\n');
- if (index_of_lf != StringPiece::npos) {
+ size_t index_of_lf = base::StringPiece(buf, buf_len).find('\n');
+ if (index_of_lf != base::StringPiece::npos) {
buf_len = static_cast<int>(index_of_lf);
if (buf_len && buf[buf_len - 1] == '\r') // Eliminate a preceding CR.
buf_len--;
@@ -121,8 +121,8 @@ int HttpChunkedDecoder::ScanForChunkRemaining(const char* buf, int buf_len) {
chunk_terminator_remaining_ = false;
} else if (buf_len) {
// Ignore any chunk-extensions.
- size_t index_of_semicolon = StringPiece(buf, buf_len).find(';');
- if (index_of_semicolon != StringPiece::npos)
+ size_t index_of_semicolon = base::StringPiece(buf, buf_len).find(';');
+ if (index_of_semicolon != base::StringPiece::npos)
buf_len = static_cast<int>(index_of_semicolon);
if (!ParseChunkSize(buf, buf_len, &chunk_remaining_)) {
@@ -181,8 +181,8 @@ bool HttpChunkedDecoder::ParseChunkSize(const char* start, int len, int* out) {
// Be more restrictive than HexStringToInt;
// don't allow inputs with leading "-", "+", "0x", "0X"
- if (StringPiece(start, len).find_first_not_of("0123456789abcdefABCDEF")!=
- StringPiece::npos)
+ if (base::StringPiece(start, len).find_first_not_of("0123456789abcdefABCDEF")
+ != base::StringPiece::npos)
return false;
int parsed_number;
« no previous file with comments | « net/base/registry_controlled_domain.cc ('k') | net/http/http_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698