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

Unified Diff: net/ftp/ftp_directory_listing_parser_windows.cc

Issue 1215933004: New new versions of Starts/EndsWith and SplitString in net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 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/ftp/ftp_directory_listing_parser_vms.cc ('k') | net/ftp/ftp_network_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_directory_listing_parser_windows.cc
diff --git a/net/ftp/ftp_directory_listing_parser_windows.cc b/net/ftp/ftp_directory_listing_parser_windows.cc
index f394b1705ad0510dab6e0b6c29d06fe3a1eb2af0..25ceaf7060616f9d43357a7fa3dc5e7e2bbb2974 100644
--- a/net/ftp/ftp_directory_listing_parser_windows.cc
+++ b/net/ftp/ftp_directory_listing_parser_windows.cc
@@ -9,6 +9,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "net/ftp/ftp_directory_listing_parser.h"
#include "net/ftp/ftp_util.h"
@@ -22,8 +23,9 @@ bool ParseFtpDirectoryListingWindows(
if (lines[i].empty())
continue;
- std::vector<base::string16> columns;
- base::SplitString(base::CollapseWhitespace(lines[i], false), ' ', &columns);
+ std::vector<base::string16> columns = base::SplitString(
+ base::CollapseWhitespace(lines[i], false), base::ASCIIToUTF16(" "),
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
// Every line of the listing consists of the following:
//
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_vms.cc ('k') | net/ftp/ftp_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698