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

Unified Diff: net/base/net_util.cc

Issue 3054042: De-wstringify some browser startup code. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: net fix Created 10 years, 5 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/net_util.h ('k') | net/base/net_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.cc
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index 1d903b8ce71963a32b10ceb8e50015fd62f49a4a..a125664ad87e3f4ad3691db0def873fb42a23ee9 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -1638,7 +1638,7 @@ GURL SimplifyUrlForRequest(const GURL& url) {
// Specifies a comma separated list of port numbers that should be accepted
// despite bans. If the string is invalid no allowed ports are stored.
-void SetExplicitlyAllowedPorts(const std::wstring& allowed_ports) {
+void SetExplicitlyAllowedPorts(const std::string& allowed_ports) {
if (allowed_ports.empty())
return;
@@ -1646,7 +1646,7 @@ void SetExplicitlyAllowedPorts(const std::wstring& allowed_ports) {
size_t last = 0;
size_t size = allowed_ports.size();
// The comma delimiter.
- const std::wstring::value_type kComma = L',';
+ const std::string::value_type kComma = ',';
// Overflow is still possible for evil user inputs.
for (size_t i = 0; i <= size; ++i) {
@@ -1658,8 +1658,7 @@ void SetExplicitlyAllowedPorts(const std::wstring& allowed_ports) {
size_t length = i - last;
if (length > 0) {
int port;
- base::StringToInt(WideToUTF8(allowed_ports.substr(last, length)),
- &port);
+ base::StringToInt(allowed_ports.substr(last, length), &port);
ports.insert(port);
}
last = i + 1;
« no previous file with comments | « net/base/net_util.h ('k') | net/base/net_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698