Index: net/proxy/proxy_bypass_rules.cc |
diff --git a/net/proxy/proxy_bypass_rules.cc b/net/proxy/proxy_bypass_rules.cc |
index 3d622a8978575f0f51f2ffa2ac3b9fb320110563..1c0fd6142cf1b17fe7c7c16f186fee24237dba06 100644 |
--- a/net/proxy/proxy_bypass_rules.cc |
+++ b/net/proxy/proxy_bypass_rules.cc |
@@ -7,6 +7,7 @@ |
#include "base/stl_util.h" |
#include "base/stringprintf.h" |
#include "base/string_number_conversions.h" |
+#include "base/string_piece.h" |
#include "base/string_tokenizer.h" |
#include "base/string_util.h" |
#include "net/base/net_util.h" |
@@ -315,7 +316,9 @@ bool ProxyBypassRules::AddRuleFromStringInternal( |
host = raw; |
port = -1; |
if (pos_colon != std::string::npos) { |
- if (!base::StringToInt(raw.begin() + pos_colon + 1, raw.end(), &port) || |
+ if (!base::StringToInt(base::StringPiece(raw.begin() + pos_colon + 1, |
+ raw.end()), |
+ &port) || |
(port < 0 || port > 0xFFFF)) { |
return false; // Port was invalid. |
} |