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

Unified Diff: net/base/net_util.cc

Issue 3968001: Update code that previously constructed strings from string iterators only to... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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
Index: net/base/net_util.cc
===================================================================
--- net/base/net_util.cc (revision 63369)
+++ net/base/net_util.cc (working copy)
@@ -1676,10 +1676,11 @@
(allowed_ports[i] != kComma))
return;
if (i == size || allowed_ports[i] == kComma) {
- size_t length = i - last;
- if (length > 0) {
+ if (i > last) {
int port;
- base::StringToInt(allowed_ports.substr(last, length), &port);
+ base::StringToInt(allowed_ports.begin() + last,
+ allowed_ports.begin() + i,
+ &port);
ports.insert(port);
}
last = i + 1;

Powered by Google App Engine
This is Rietveld 408576698