summaryrefslogtreecommitdiffstats
path: root/net/ftp
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-14 00:35:36 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-14 00:35:36 +0000
commit76eb0247d08fa6c503517ec1a0cb8e6566cd39c7 (patch)
treee14c2632fab2f76df22827fe0c7908fd54240699 /net/ftp
parent7f8aff5b10859950cf9a6996a5d3d288ea3c75f4 (diff)
downloadchromium_src-76eb0247d08fa6c503517ec1a0cb8e6566cd39c7.zip
chromium_src-76eb0247d08fa6c503517ec1a0cb8e6566cd39c7.tar.gz
chromium_src-76eb0247d08fa6c503517ec1a0cb8e6566cd39c7.tar.bz2
base: Move SplitString functions into the base namespace and update the callers.
BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3750001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62483 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/ftp')
-rw-r--r--net/ftp/ftp_directory_listing_parser_ls.cc2
-rw-r--r--net/ftp/ftp_directory_listing_parser_mlsd.cc8
-rw-r--r--net/ftp/ftp_directory_listing_parser_netware.cc2
-rw-r--r--net/ftp/ftp_directory_listing_parser_vms.cc14
-rw-r--r--net/ftp/ftp_directory_listing_parser_vms_unittest.cc2
-rw-r--r--net/ftp/ftp_directory_listing_parser_windows.cc6
6 files changed, 17 insertions, 17 deletions
diff --git a/net/ftp/ftp_directory_listing_parser_ls.cc b/net/ftp/ftp_directory_listing_parser_ls.cc
index 038af11..b8061a3 100644
--- a/net/ftp/ftp_directory_listing_parser_ls.cc
+++ b/net/ftp/ftp_directory_listing_parser_ls.cc
@@ -99,7 +99,7 @@ bool FtpDirectoryListingParserLs::ConsumeLine(const string16& line) {
received_nonempty_line_ = true;
std::vector<string16> columns;
- SplitString(CollapseWhitespace(line, false), ' ', &columns);
+ base::SplitString(CollapseWhitespace(line, false), ' ', &columns);
// Some FTP servers put a "total n" line at the beginning of the listing
// (n is an integer). Allow such a line, but only once, and only if it's
diff --git a/net/ftp/ftp_directory_listing_parser_mlsd.cc b/net/ftp/ftp_directory_listing_parser_mlsd.cc
index 6d49634..dc6dace 100644
--- a/net/ftp/ftp_directory_listing_parser_mlsd.cc
+++ b/net/ftp/ftp_directory_listing_parser_mlsd.cc
@@ -1,6 +1,6 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
#include "net/ftp/ftp_directory_listing_parser_mlsd.h"
@@ -60,7 +60,7 @@ bool FtpDirectoryListingParserMlsd::ConsumeLine(const string16& line) {
string16 facts_string = line.substr(0, first_space_pos - 1);
string16 filename = line.substr(first_space_pos + 1);
std::vector<string16> facts_split;
- SplitString(facts_string, ';', &facts_split);
+ base::SplitString(facts_string, ';', &facts_split);
const char* keys[] = {
"modify",
diff --git a/net/ftp/ftp_directory_listing_parser_netware.cc b/net/ftp/ftp_directory_listing_parser_netware.cc
index 40f6505..3cd0c8f 100644
--- a/net/ftp/ftp_directory_listing_parser_netware.cc
+++ b/net/ftp/ftp_directory_listing_parser_netware.cc
@@ -48,7 +48,7 @@ bool FtpDirectoryListingParserNetware::ConsumeLine(const string16& line) {
}
std::vector<string16> columns;
- SplitString(CollapseWhitespace(line, false), ' ', &columns);
+ base::SplitString(CollapseWhitespace(line, false), ' ', &columns);
if (columns.size() != 8)
return false;
diff --git a/net/ftp/ftp_directory_listing_parser_vms.cc b/net/ftp/ftp_directory_listing_parser_vms.cc
index 7148aee..3702a14 100644
--- a/net/ftp/ftp_directory_listing_parser_vms.cc
+++ b/net/ftp/ftp_directory_listing_parser_vms.cc
@@ -21,7 +21,7 @@ bool ParseVmsFilename(const string16& raw_filename, string16* parsed_filename,
// On VMS, the files and directories are versioned. The version number is
// separated from the file name by a semicolon. Example: ANNOUNCE.TXT;2.
std::vector<string16> listing_parts;
- SplitString(raw_filename, ';', &listing_parts);
+ base::SplitString(raw_filename, ';', &listing_parts);
if (listing_parts.size() != 2)
return false;
int version_number;
@@ -35,7 +35,7 @@ bool ParseVmsFilename(const string16& raw_filename, string16* parsed_filename,
// case-insensitive, but generally uses uppercase characters. This may look
// awkward, so we convert them to lower case.
std::vector<string16> filename_parts;
- SplitString(listing_parts[0], '.', &filename_parts);
+ base::SplitString(listing_parts[0], '.', &filename_parts);
if (filename_parts.size() != 2)
return false;
if (EqualsASCII(filename_parts[1], "DIR")) {
@@ -60,7 +60,7 @@ bool ParseVmsFilesize(const string16& input, int64* size) {
}
std::vector<string16> parts;
- SplitString(input, '/', &parts);
+ base::SplitString(input, '/', &parts);
if (parts.size() != 2)
return false;
@@ -101,7 +101,7 @@ bool LooksLikeVmsFileProtectionListing(const string16& input) {
// We expect four parts of the file protection listing: for System, Owner,
// Group, and World.
std::vector<string16> parts;
- SplitString(input.substr(1, input.length() - 2), ',', &parts);
+ base::SplitString(input.substr(1, input.length() - 2), ',', &parts);
if (parts.size() != 4)
return false;
@@ -125,7 +125,7 @@ bool VmsDateListingToTime(const std::vector<string16>& columns,
// Date should be in format DD-MMM-YYYY.
std::vector<string16> date_parts;
- SplitString(columns[1], '-', &date_parts);
+ base::SplitString(columns[1], '-', &date_parts);
if (date_parts.size() != 3)
return false;
if (!base::StringToInt(date_parts[0], &time_exploded.day_of_month))
@@ -146,7 +146,7 @@ bool VmsDateListingToTime(const std::vector<string16>& columns,
if (time_column.length() != 5)
return false;
std::vector<string16> time_parts;
- SplitString(time_column, ':', &time_parts);
+ base::SplitString(time_column, ':', &time_parts);
if (time_parts.size() != 2)
return false;
if (!base::StringToInt(time_parts[0], &time_exploded.hour))
@@ -229,7 +229,7 @@ FtpDirectoryListingEntry FtpDirectoryListingParserVms::PopEntry() {
bool FtpDirectoryListingParserVms::ConsumeEntryLine(const string16& line) {
std::vector<string16> columns;
- SplitString(CollapseWhitespace(line, false), ' ', &columns);
+ base::SplitString(CollapseWhitespace(line, false), ' ', &columns);
if (columns.size() == 1) {
if (!last_filename_.empty())
diff --git a/net/ftp/ftp_directory_listing_parser_vms_unittest.cc b/net/ftp/ftp_directory_listing_parser_vms_unittest.cc
index ab5366f..eb1554d 100644
--- a/net/ftp/ftp_directory_listing_parser_vms_unittest.cc
+++ b/net/ftp/ftp_directory_listing_parser_vms_unittest.cc
@@ -106,7 +106,7 @@ TEST_F(FtpDirectoryListingParserVmsTest, Bad) {
SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]: %s", i, bad_cases[i]));
std::vector<std::string> lines;
- SplitString(bad_cases[i], '|', &lines);
+ base::SplitString(bad_cases[i], '|', &lines);
net::FtpDirectoryListingParserVms parser;
bool failed = false;
for (std::vector<std::string>::const_iterator i = lines.begin();
diff --git a/net/ftp/ftp_directory_listing_parser_windows.cc b/net/ftp/ftp_directory_listing_parser_windows.cc
index 2ff3cd2..d2bbdaa 100644
--- a/net/ftp/ftp_directory_listing_parser_windows.cc
+++ b/net/ftp/ftp_directory_listing_parser_windows.cc
@@ -21,7 +21,7 @@ bool WindowsDateListingToTime(const std::vector<string16>& columns,
// Date should be in format MM-DD-YY[YY].
std::vector<string16> date_parts;
- SplitString(columns[0], '-', &date_parts);
+ base::SplitString(columns[0], '-', &date_parts);
if (date_parts.size() != 3)
return false;
if (!base::StringToInt(date_parts[0], &time_exploded.month))
@@ -43,7 +43,7 @@ bool WindowsDateListingToTime(const std::vector<string16>& columns,
if (columns[1].length() != 7)
return false;
std::vector<string16> time_parts;
- SplitString(columns[1].substr(0, 5), ':', &time_parts);
+ base::SplitString(columns[1].substr(0, 5), ':', &time_parts);
if (time_parts.size() != 2)
return false;
if (!base::StringToInt(time_parts[0], &time_exploded.hour))
@@ -77,7 +77,7 @@ FtpDirectoryListingParserWindows::FtpDirectoryListingParserWindows() {
bool FtpDirectoryListingParserWindows::ConsumeLine(const string16& line) {
std::vector<string16> columns;
- SplitString(CollapseWhitespace(line, false), ' ', &columns);
+ base::SplitString(CollapseWhitespace(line, false), ' ', &columns);
// We may receive file names containing spaces, which can make the number of
// columns arbitrarily large. We will handle that later. For now just make