diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-10 21:08:39 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-10 21:08:39 +0000 |
commit | 8a16266e66a38bc1bfc6b00893c2a7c8cf8c55ee (patch) | |
tree | 5c07a9d5091a56c6d5a1a2b98ec10d19ae3c20e9 /net/http | |
parent | f8dce00e633d5ffde45e008fb8f51d5a76942f6b (diff) | |
download | chromium_src-8a16266e66a38bc1bfc6b00893c2a7c8cf8c55ee.zip chromium_src-8a16266e66a38bc1bfc6b00893c2a7c8cf8c55ee.tar.gz chromium_src-8a16266e66a38bc1bfc6b00893c2a7c8cf8c55ee.tar.bz2 |
Move StringPiece into the base namespace. It is colliding
with the StringPiece class in icu4.2, which is a problem
when trying to use the system version of icu.
Review URL: http://codereview.chromium.org/193072
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25920 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_chunked_decoder.cc | 12 | ||||
-rw-r--r-- | net/http/http_util.cc | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/net/http/http_chunked_decoder.cc b/net/http/http_chunked_decoder.cc index 71f7554..25b789f 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; diff --git a/net/http/http_util.cc b/net/http/http_util.cc index 4381117..41aa554 100644 --- a/net/http/http_util.cc +++ b/net/http/http_util.cc @@ -500,8 +500,8 @@ static bool IsLineSegmentContinuable(const char* begin, const char* end) { // Helper used by AssembleRawHeaders, to find the end of the status line. static const char* FindStatusLineEnd(const char* begin, const char* end) { - size_t i = StringPiece(begin, end - begin).find_first_of("\r\n"); - if (i == StringPiece::npos) + size_t i = base::StringPiece(begin, end - begin).find_first_of("\r\n"); + if (i == base::StringPiece::npos) return end; return begin + i; } |