| Index: net/ftp/ftp_ctrl_response_buffer.cc
|
| diff --git a/net/ftp/ftp_ctrl_response_buffer.cc b/net/ftp/ftp_ctrl_response_buffer.cc
|
| index 8dd631b6c45bb871c11c01116c371ade2c75a8d5..c2d848367569ef312984a2f85ef81b28a4daf344 100644
|
| --- a/net/ftp/ftp_ctrl_response_buffer.cc
|
| +++ b/net/ftp/ftp_ctrl_response_buffer.cc
|
| @@ -8,7 +8,7 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/logging.h"
|
| -#include "base/strings/string_number_conversions.h"
|
| +#include "net/base/parse_number.h"
|
| #include "base/strings/string_piece.h"
|
| #include "base/values.h"
|
| #include "net/base/net_errors.h"
|
| @@ -123,10 +123,11 @@ FtpCtrlResponseBuffer::ParsedLine FtpCtrlResponseBuffer::ParseLine(
|
| ParsedLine result;
|
|
|
| if (line.length() >= 3) {
|
| - if (base::StringToInt(base::StringPiece(line.begin(), line.begin() + 3),
|
| - &result.status_code))
|
| - result.has_status_code = (100 <= result.status_code &&
|
| - result.status_code <= 599);
|
| + if (ParseInt32(base::StringPiece(line.begin(), line.begin() + 3),
|
| + ParseIntFormat::NON_NEGATIVE, &result.status_code)) {
|
| + result.has_status_code =
|
| + (100 <= result.status_code && result.status_code <= 599);
|
| + }
|
| if (result.has_status_code && line.length() >= 4 && line[3] == ' ') {
|
| result.is_complete = true;
|
| } else if (result.has_status_code && line.length() >= 4 && line[3] == '-') {
|
|
|