summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--app/l10n_util.cc2
-rw-r--r--app/text_elider.cc4
-rw-r--r--base/command_line.cc4
-rw-r--r--base/process_util_linux.cc6
-rw-r--r--base/string_split.cc4
-rw-r--r--base/string_split.h6
-rw-r--r--base/string_util.h1
-rw-r--r--base/version.cc2
-rw-r--r--chrome/app/breakpad_win.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_index_unittest.cc8
-rw-r--r--chrome/browser/browser_main.cc2
-rw-r--r--chrome/browser/chromeos/input_method/input_method_util.cc4
-rw-r--r--chrome/browser/chromeos/login/authenticator.cc2
-rw-r--r--chrome/browser/chromeos/options/language_config_model.cc4
-rw-r--r--chrome/browser/chromeos/preferences.cc2
-rw-r--r--chrome/browser/chromeos/status/input_method_menu.cc2
-rw-r--r--chrome/browser/chromeos/version_loader.cc2
-rw-r--r--chrome/browser/dom_ui/new_tab_page_sync_handler.cc2
-rw-r--r--chrome/browser/dom_ui/options/cookies_view_handler.cc2
-rw-r--r--chrome/browser/download/download_prefs.cc2
-rw-r--r--chrome/browser/download/save_package.cc2
-rw-r--r--chrome/browser/extensions/extension_devtools_events.cc3
-rw-r--r--chrome/browser/extensions/extension_updater.cc2
-rw-r--r--chrome/browser/extensions/extension_updater_unittest.cc8
-rw-r--r--chrome/browser/first_run/first_run_win.cc2
-rw-r--r--chrome/browser/history/snippet.cc2
-rw-r--r--chrome/browser/history/snippet_unittest.cc2
-rw-r--r--chrome/browser/importer/firefox2_importer.cc4
-rw-r--r--chrome/browser/importer/firefox_importer_utils.cc6
-rw-r--r--chrome/browser/importer/ie_importer.cc2
-rw-r--r--chrome/browser/importer/nss_decryptor.cc2
-rw-r--r--chrome/browser/importer/toolbar_importer.cc4
-rw-r--r--chrome/browser/io_thread.cc2
-rw-r--r--chrome/browser/language_combobox_model.cc2
-rw-r--r--chrome/browser/language_order_table_model.cc2
-rw-r--r--chrome/browser/password_manager/password_form_manager.cc4
-rw-r--r--chrome/browser/process_singleton_linux.cc2
-rw-r--r--chrome/browser/safe_browsing/chunk_range.cc4
-rw-r--r--chrome/browser/safe_browsing/protocol_parser.cc8
-rw-r--r--chrome/browser/search_engines/template_url_model.cc2
-rw-r--r--chrome/browser/search_engines/template_url_model_unittest.cc8
-rw-r--r--chrome/browser/spellcheck_host.cc4
-rw-r--r--chrome/browser/translate/translate_manager.cc2
-rw-r--r--chrome/browser/views/shell_dialogs_win.cc2
-rw-r--r--chrome/browser/webdata/web_database.cc2
-rw-r--r--chrome/common/extensions/url_pattern.cc2
-rw-r--r--chrome/common/pepper_plugin_registry.cc6
-rw-r--r--chrome/common/zip.cc2
-rw-r--r--chrome/default_plugin/plugin_database_handler.cc5
-rw-r--r--chrome/installer/util/compat_checks.cc2
-rw-r--r--chrome/installer/util/shell_util.cc4
-rw-r--r--chrome/installer/util/version.cc2
-rw-r--r--chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc4
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc2
-rw-r--r--chrome/test/automated_ui_tests/automated_ui_tests.cc2
-rw-r--r--chrome/test/chrome_process_util_mac.cc4
-rw-r--r--chrome/test/selenium/selenium_test.cc2
-rw-r--r--chrome/test/startup/startup_test.cc2
-rw-r--r--chrome/test/ui/dom_checker_uitest.cc2
-rw-r--r--chrome/test/ui/ui_test.cc2
-rw-r--r--chrome/test/webdriver/dispatch.h2
-rw-r--r--chrome/tools/convert_dict/aff_reader.cc6
-rw-r--r--chrome_frame/chrome_frame_activex.cc6
-rw-r--r--chrome_frame/chrome_frame_npapi.cc12
-rw-r--r--chrome_frame/metrics_service.cc2
-rw-r--r--net/base/host_mapping_rules.cc2
-rw-r--r--net/base/mime_util.cc2
-rw-r--r--net/base/net_util.cc2
-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
-rw-r--r--net/http/http_network_layer.cc2
-rw-r--r--net/http/http_stream_factory.cc2
-rw-r--r--net/tools/hresolv/hresolv.cc2
-rw-r--r--net/websockets/websocket_job_unittest.cc2
-rw-r--r--views/controls/label.cc2
-rw-r--r--webkit/glue/plugins/plugin_lib_mac.mm4
-rw-r--r--webkit/glue/plugins/plugin_lib_posix.cc2
-rw-r--r--webkit/glue/plugins/plugin_list.cc14
-rw-r--r--webkit/glue/plugins/plugin_list_posix.cc2
-rw-r--r--webkit/glue/plugins/plugin_list_win.cc10
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_win.cc2
85 files changed, 151 insertions, 150 deletions
diff --git a/app/l10n_util.cc b/app/l10n_util.cc
index 00e8a61..6b25202 100644
--- a/app/l10n_util.cc
+++ b/app/l10n_util.cc
@@ -339,7 +339,7 @@ std::string GetSystemLocale() {
void SplitAndNormalizeLanguageList(const std::string& env_language,
std::vector<std::string>* result) {
std::vector<std::string> langs;
- SplitString(env_language, ':', &langs);
+ base::SplitString(env_language, ':', &langs);
std::vector<std::string>::iterator i = langs.begin();
for (; i != langs.end(); ++i) {
size_t end_pos = i->find_first_of(".@");
diff --git a/app/text_elider.cc b/app/text_elider.cc
index 3fdb001..4f7ddfb 100644
--- a/app/text_elider.cc
+++ b/app/text_elider.cc
@@ -123,7 +123,7 @@ std::wstring ElideUrl(const GURL& url,
if (url.SchemeIsFile()) {
// Split the path string using ":"
std::vector<std::wstring> file_path_split;
- SplitString(url_path, L':', &file_path_split);
+ base::SplitString(url_path, L':', &file_path_split);
if (file_path_split.size() > 1) { // File is of type "file:///C:/.."
url_host.clear();
url_domain.clear();
@@ -164,7 +164,7 @@ std::wstring ElideUrl(const GURL& url,
// Parse url_path using '/'.
std::vector<std::wstring> url_path_elements;
- SplitString(url_path, L'/', &url_path_elements);
+ base::SplitString(url_path, L'/', &url_path_elements);
// Get filename - note that for a path ending with /
// such as www.google.com/intl/ads/, the file name is ads/.
diff --git a/base/command_line.cc b/base/command_line.cc
index 477b4e7..1c39066 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -449,7 +449,7 @@ void CommandLine::PrependWrapper(const std::wstring& wrapper) {
// The wrapper may have embedded arguments (like "gdb --args"). In this case,
// we don't pretend to do anything fancy, we just split on spaces.
std::vector<std::wstring> wrapper_and_args;
- SplitString(wrapper, ' ', &wrapper_and_args);
+ base::SplitString(wrapper, ' ', &wrapper_and_args);
program_ = wrapper_and_args[0];
command_line_string_ = wrapper + L" " + command_line_string_;
}
@@ -500,7 +500,7 @@ void CommandLine::PrependWrapper(const std::string& wrapper) {
// The wrapper may have embedded arguments (like "gdb --args"). In this case,
// we don't pretend to do anything fancy, we just split on spaces.
std::vector<std::string> wrapper_and_args;
- SplitString(wrapper, ' ', &wrapper_and_args);
+ base::SplitString(wrapper, ' ', &wrapper_and_args);
argv_.insert(argv_.begin(), wrapper_and_args.begin(), wrapper_and_args.end());
}
diff --git a/base/process_util_linux.cc b/base/process_util_linux.cc
index 4c034c4..231db59 100644
--- a/base/process_util_linux.cc
+++ b/base/process_util_linux.cc
@@ -39,7 +39,7 @@ bool GetProcStats(pid_t pid, std::vector<std::string>* proc_stats) {
std::string mem_stats;
if (!file_util::ReadFileToString(stat_file, &mem_stats))
return false;
- SplitString(mem_stats, ' ', proc_stats);
+ base::SplitString(mem_stats, ' ', proc_stats);
return true;
}
@@ -358,7 +358,7 @@ bool ProcessMetrics::GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const {
return false;
std::vector<std::string> statm_vec;
- SplitString(statm, ' ', &statm_vec);
+ base::SplitString(statm, ' ', &statm_vec);
if (statm_vec.size() != 7)
return false; // Not the format we expect.
@@ -434,7 +434,7 @@ int ParseProcStatCPU(const std::string& input) {
// 0-indexed 11th and 12th are utime and stime. On two different machines
// I found 42 and 39 fields, so let's just expect the ones we need.
std::vector<std::string> fields;
- SplitString(input.substr(rparen + 2), ' ', &fields);
+ base::SplitString(input.substr(rparen + 2), ' ', &fields);
if (fields.size() < 13)
return -1; // Output not in the format we expect.
diff --git a/base/string_split.cc b/base/string_split.cc
index ca97954..1075610 100644
--- a/base/string_split.cc
+++ b/base/string_split.cc
@@ -9,6 +9,8 @@
#include "base/third_party/icu/icu_utf.h"
#include "base/utf_string_conversions.h"
+namespace base {
+
template<typename STR>
static void SplitStringT(const STR& str,
const typename STR::value_type s,
@@ -55,8 +57,6 @@ void SplitString(const std::string& str,
SplitStringT(str, c, true, r);
}
-namespace base {
-
bool SplitStringIntoKeyValues(
const std::string& line,
char key_value_delimiter,
diff --git a/base/string_split.h b/base/string_split.h
index c7cb5e7..9e1af19 100644
--- a/base/string_split.h
+++ b/base/string_split.h
@@ -12,9 +12,7 @@
#include "base/string16.h"
-// TODO(tfarina): Move the following functions into the namespace and update the
-// callers.
-//-----------------------------------------------------------------------------
+namespace base {
// Splits |str| into a vector of strings delimited by |s|. Append the results
// into |r| as they appear. If several instances of |s| are contiguous, or if
@@ -39,8 +37,6 @@ void SplitString(const std::string& str,
char c,
std::vector<std::string>* r);
-namespace base {
-
bool SplitStringIntoKeyValues(
const std::string& line,
char key_value_delimiter,
diff --git a/base/string_util.h b/base/string_util.h
index 41a0cd4..4fb3e42 100644
--- a/base/string_util.h
+++ b/base/string_util.h
@@ -27,6 +27,7 @@
// TODO(tfarina): Fix the rlz library to include this instead and remove
// this include.
#include "base/string_split.h"
+using base::SplitString;
#endif // RLZ_WIN_LIB_RLZ_LIB_H_
// Safe standard library wrappers for all platforms.
diff --git a/base/version.cc b/base/version.cc
index 22d0e04..9fbcb6a 100644
--- a/base/version.cc
+++ b/base/version.cc
@@ -75,7 +75,7 @@ const std::string Version::GetString() const {
bool Version::InitFromString(const std::string& version_str) {
DCHECK(!is_valid_);
std::vector<std::string> numbers;
- SplitString(version_str, '.', &numbers);
+ base::SplitString(version_str, '.', &numbers);
if (numbers.empty())
return false;
for (std::vector<std::string>::iterator i = numbers.begin();
diff --git a/chrome/app/breakpad_win.cc b/chrome/app/breakpad_win.cc
index 5d57166..3f4f862 100644
--- a/chrome/app/breakpad_win.cc
+++ b/chrome/app/breakpad_win.cc
@@ -409,7 +409,7 @@ bool ShowRestartDialogIfCrashed(bool* exit_now) {
// The CHROME_RESTART var contains the dialog strings separated by '|'.
// See PrepareRestartOnCrashEnviroment() function for details.
std::vector<std::wstring> dlg_strings;
- SplitString(restart_data, L'|', &dlg_strings);
+ base::SplitString(restart_data, L'|', &dlg_strings);
delete[] restart_data;
if (dlg_strings.size() < 3)
return true;
diff --git a/chrome/browser/bookmarks/bookmark_index_unittest.cc b/chrome/browser/bookmarks/bookmark_index_unittest.cc
index e84f1b7..327c357 100644
--- a/chrome/browser/bookmarks/bookmark_index_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_index_unittest.cc
@@ -68,10 +68,10 @@ class BookmarkIndexTest : public testing::Test {
void ExtractMatchPositions(const std::string& string,
Snippet::MatchPositions* matches) {
std::vector<std::string> match_strings;
- SplitString(string, ':', &match_strings);
+ base::SplitString(string, ':', &match_strings);
for (size_t i = 0; i < match_strings.size(); ++i) {
std::vector<std::string> chunks;
- SplitString(match_strings[i], ',', &chunks);
+ base::SplitString(match_strings[i], ',', &chunks);
ASSERT_EQ(2U, chunks.size());
matches->push_back(Snippet::MatchPosition());
int chunks0, chunks1;
@@ -135,12 +135,12 @@ TEST_F(BookmarkIndexTest, Tests) {
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(data); ++i) {
std::vector<std::string> titles;
- SplitString(data[i].input, ';', &titles);
+ base::SplitString(data[i].input, ';', &titles);
AddBookmarksWithTitles(titles);
std::vector<std::string> expected;
if (!data[i].expected.empty())
- SplitString(data[i].expected, ';', &expected);
+ base::SplitString(data[i].expected, ';', &expected);
ExpectMatches(data[i].query, expected);
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 4481843..7dce691 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -804,7 +804,7 @@ void OptionallyRunChromeOSLoginManager(const CommandLine& parsed_command_line) {
// default to the entire screen. This is mostly useful for testing.
if (size_arg.size()) {
std::vector<std::string> dimensions;
- SplitString(size_arg, ',', &dimensions);
+ base::SplitString(size_arg, ',', &dimensions);
if (dimensions.size() == 2) {
int width, height;
if (base::StringToInt(dimensions[0], &width) &&
diff --git a/chrome/browser/chromeos/input_method/input_method_util.cc b/chrome/browser/chromeos/input_method/input_method_util.cc
index 188dea2..0df1b45 100644
--- a/chrome/browser/chromeos/input_method/input_method_util.cc
+++ b/chrome/browser/chromeos/input_method/input_method_util.cc
@@ -435,7 +435,7 @@ std::string GetLanguageCodeFromDescriptor(
language_code == "zh" ||
language_code == "pt")) {
std::vector<std::string> portions;
- SplitString(descriptor.id, ':', &portions);
+ base::SplitString(descriptor.id, ':', &portions);
if (portions.size() >= 2 && !portions[1].empty()) {
language_code.append("-");
language_code.append(StringToUpperASCII(portions[1]));
@@ -463,7 +463,7 @@ std::string GetKeyboardLayoutName(const std::string& input_method_id) {
}
std::vector<std::string> splitted_id;
- SplitString(input_method_id, ':', &splitted_id);
+ base::SplitString(input_method_id, ':', &splitted_id);
return (splitted_id.size() > 1) ? splitted_id[1] : "";
}
diff --git a/chrome/browser/chromeos/login/authenticator.cc b/chrome/browser/chromeos/login/authenticator.cc
index 1ca3378a..5287dea 100644
--- a/chrome/browser/chromeos/login/authenticator.cc
+++ b/chrome/browser/chromeos/login/authenticator.cc
@@ -24,7 +24,7 @@ Authenticator::~Authenticator() {}
std::string Authenticator::Canonicalize(const std::string& email_address) {
std::vector<std::string> parts;
char at = '@';
- SplitString(email_address, at, &parts);
+ base::SplitString(email_address, at, &parts);
DCHECK_EQ(parts.size(), 2U) << "email_address should have only one @";
RemoveChars(parts[0], ".", &parts[0]);
if (parts[0].find('+') != std::string::npos)
diff --git a/chrome/browser/chromeos/options/language_config_model.cc b/chrome/browser/chromeos/options/language_config_model.cc
index 3502c2f..0335fa2 100644
--- a/chrome/browser/chromeos/options/language_config_model.cc
+++ b/chrome/browser/chromeos/options/language_config_model.cc
@@ -196,7 +196,7 @@ void LanguageConfigModel::GetActiveInputMethodIds(
const std::string value = preload_engines_pref_.GetValue();
out_input_method_ids->clear();
if (!value.empty())
- SplitString(value, ',', out_input_method_ids);
+ base::SplitString(value, ',', out_input_method_ids);
}
void LanguageConfigModel::GetPreferredLanguageCodes(
@@ -204,7 +204,7 @@ void LanguageConfigModel::GetPreferredLanguageCodes(
const std::string value = preferred_languages_pref_.GetValue();
out_language_codes->clear();
if (!value.empty())
- SplitString(value, ',', out_language_codes);
+ base::SplitString(value, ',', out_language_codes);
}
void LanguageConfigModel::GetInputMethodIdsFromLanguageCode(
diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc
index b9aff33..d23ff9e 100644
--- a/chrome/browser/chromeos/preferences.cc
+++ b/chrome/browser/chromeos/preferences.cc
@@ -407,7 +407,7 @@ void Preferences::SetLanguageConfigStringListAsCSV(const char* section,
std::vector<std::string> split_values;
if (!value.empty())
- SplitString(value, ',', &split_values);
+ base::SplitString(value, ',', &split_values);
// We should call the cros API even when |value| is empty, to disable default
// config.
diff --git a/chrome/browser/chromeos/status/input_method_menu.cc b/chrome/browser/chromeos/status/input_method_menu.cc
index 17ef62c..e1411e8 100644
--- a/chrome/browser/chromeos/status/input_method_menu.cc
+++ b/chrome/browser/chromeos/status/input_method_menu.cc
@@ -570,7 +570,7 @@ std::wstring InputMethodMenu::GetTextForIndicator(
// rather than "ZH".
if (StartsWithASCII(language_code, "zh-", false)) {
std::vector<std::string> portions;
- SplitString(language_code, '-', &portions);
+ base::SplitString(language_code, '-', &portions);
if (portions.size() >= 2 && !portions[1].empty()) {
language_code = portions[1];
}
diff --git a/chrome/browser/chromeos/version_loader.cc b/chrome/browser/chromeos/version_loader.cc
index e24b357..b7b9dde 100644
--- a/chrome/browser/chromeos/version_loader.cc
+++ b/chrome/browser/chromeos/version_loader.cc
@@ -52,7 +52,7 @@ std::string VersionLoader::ParseVersion(const std::string& contents) {
// Split the lines and look for the one that starts with kPrefix. The version
// file is small, which is why we don't try and be tricky.
std::vector<std::string> lines;
- SplitString(contents, '\n', &lines);
+ base::SplitString(contents, '\n', &lines);
for (size_t i = 0; i < lines.size(); ++i) {
if (StartsWithASCII(lines[i], kPrefix, false)) {
std::string version = lines[i].substr(std::string(kPrefix).size());
diff --git a/chrome/browser/dom_ui/new_tab_page_sync_handler.cc b/chrome/browser/dom_ui/new_tab_page_sync_handler.cc
index 53c008e..ec74f3c 100644
--- a/chrome/browser/dom_ui/new_tab_page_sync_handler.cc
+++ b/chrome/browser/dom_ui/new_tab_page_sync_handler.cc
@@ -60,7 +60,7 @@ bool IsGoogleGAIACookieInstalled() {
options.set_include_httponly(); // The SID cookie might be httponly.
std::string cookies = store->GetCookiesWithOptions(url, options);
std::vector<std::string> cookie_list;
- SplitString(cookies, ';', &cookie_list);
+ base::SplitString(cookies, ';', &cookie_list);
for (std::vector<std::string>::iterator current = cookie_list.begin();
current != cookie_list.end();
++current) {
diff --git a/chrome/browser/dom_ui/options/cookies_view_handler.cc b/chrome/browser/dom_ui/options/cookies_view_handler.cc
index 35a1317..160a8fa 100644
--- a/chrome/browser/dom_ui/options/cookies_view_handler.cc
+++ b/chrome/browser/dom_ui/options/cookies_view_handler.cc
@@ -370,7 +370,7 @@ void CookiesViewHandler::LoadChildren(const ListValue* args) {
CookieTreeNode* CookiesViewHandler::GetTreeNodeFromPath(
const std::string& path) {
std::vector<std::string> node_ids;
- SplitString(path, ',', &node_ids);
+ base::SplitString(path, ',', &node_ids);
CookieTreeNode* child = NULL;
CookieTreeNode* parent = cookies_tree_model_->GetRoot();
diff --git a/chrome/browser/download/download_prefs.cc b/chrome/browser/download/download_prefs.cc
index f37561d..b8645db 100644
--- a/chrome/browser/download/download_prefs.cc
+++ b/chrome/browser/download/download_prefs.cc
@@ -22,7 +22,7 @@ DownloadPrefs::DownloadPrefs(PrefService* prefs) : prefs_(prefs) {
std::string extensions_to_open =
prefs->GetString(prefs::kDownloadExtensionsToOpen);
std::vector<std::string> extensions;
- SplitString(extensions_to_open, ':', &extensions);
+ base::SplitString(extensions_to_open, ':', &extensions);
for (size_t i = 0; i < extensions.size(); ++i) {
#if defined(OS_POSIX)
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc
index 51dcfee..a148f18 100644
--- a/chrome/browser/download/save_package.cc
+++ b/chrome/browser/download/save_package.cc
@@ -1133,7 +1133,7 @@ FilePath SavePackage::GetSuggestedNameForSaveAs(
if (page_url_ == fixed_up_title_url) {
std::string url_path;
std::vector<std::string> url_parts;
- SplitString(page_url_.path(), '/', &url_parts);
+ base::SplitString(page_url_.path(), '/', &url_parts);
if (!url_parts.empty()) {
for (int i = static_cast<int>(url_parts.size()) - 1; i >= 0; --i) {
url_path = url_parts[i];
diff --git a/chrome/browser/extensions/extension_devtools_events.cc b/chrome/browser/extensions/extension_devtools_events.cc
index f29d459..07b691e 100644
--- a/chrome/browser/extensions/extension_devtools_events.cc
+++ b/chrome/browser/extensions/extension_devtools_events.cc
@@ -28,7 +28,8 @@ bool ExtensionDevToolsEvents::IsDevToolsEventName(
true /* case_sensitive */)) {
// At this point we want something like "4.onPageEvent"
std::vector<std::string> parts;
- SplitString(event_name.substr(strlen(kDevToolsEventPrefix)), '.', &parts);
+ base::SplitString(
+ event_name.substr(strlen(kDevToolsEventPrefix)), '.', &parts);
if (parts.size() == 2 && base::StringToInt(parts[0], tab_id)) {
return true;
}
diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc
index 42ccfba..da669c6 100644
--- a/chrome/browser/extensions/extension_updater.cc
+++ b/chrome/browser/extensions/extension_updater.cc
@@ -575,7 +575,7 @@ void ExtensionUpdater::ProcessBlacklist(const std::string& data) {
return;
}
std::vector<std::string> blacklist;
- SplitString(data, '\n', &blacklist);
+ base::SplitString(data, '\n', &blacklist);
// Tell ExtensionService to update prefs.
service_->UpdateExtensionBlacklist(blacklist);
diff --git a/chrome/browser/extensions/extension_updater_unittest.cc b/chrome/browser/extensions/extension_updater_unittest.cc
index bb07c28..25d40c4 100644
--- a/chrome/browser/extensions/extension_updater_unittest.cc
+++ b/chrome/browser/extensions/extension_updater_unittest.cc
@@ -247,10 +247,10 @@ static const int kUpdateFrequencySecs = 15;
static void ExtractParameters(const std::string& params,
std::map<std::string, std::string>* result) {
std::vector<std::string> pairs;
- SplitString(params, '&', &pairs);
+ base::SplitString(params, '&', &pairs);
for (size_t i = 0; i < pairs.size(); i++) {
std::vector<std::string> key_val;
- SplitString(pairs[i], '=', &key_val);
+ base::SplitString(pairs[i], '=', &key_val);
if (key_val.size() > 0) {
std::string key = key_val[0];
EXPECT_TRUE(result->find(key) == result->end());
@@ -326,7 +326,7 @@ class ExtensionUpdaterTest : public testing::Test {
// look something like "?x=id%3D<id>%26v%3D<version>%26uc".
EXPECT_TRUE(url.has_query());
std::vector<std::string> parts;
- SplitString(url.query(), '=', &parts);
+ base::SplitString(url.query(), '=', &parts);
EXPECT_EQ(2u, parts.size());
EXPECT_EQ("x", parts[0]);
std::string decoded = UnescapeURLComponent(parts[1],
@@ -388,7 +388,7 @@ class ExtensionUpdaterTest : public testing::Test {
// look something like "?x=id%3D<id>%26v%3D<version>%26uc".
EXPECT_TRUE(url.has_query());
std::vector<std::string> parts;
- SplitString(url.query(), '=', &parts);
+ base::SplitString(url.query(), '=', &parts);
EXPECT_EQ(2u, parts.size());
EXPECT_EQ("x", parts[0]);
std::string decoded = UnescapeURLComponent(parts[1],
diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc
index 9e078c0..03ffd56 100644
--- a/chrome/browser/first_run/first_run_win.cc
+++ b/chrome/browser/first_run/first_run_win.cc
@@ -414,7 +414,7 @@ std::string EncodeImportParams(int browser_type, int options,
bool DecodeImportParams(const std::string& encoded, int* browser_type,
int* options, int* skip_first_run_ui, HWND* window) {
std::vector<std::string> parts;
- SplitString(encoded, '@', &parts);
+ base::SplitString(encoded, '@', &parts);
if (parts.size() != 4)
return false;
diff --git a/chrome/browser/history/snippet.cc b/chrome/browser/history/snippet.cc
index 47c11c3..327b3b5 100644
--- a/chrome/browser/history/snippet.cc
+++ b/chrome/browser/history/snippet.cc
@@ -167,7 +167,7 @@ void Snippet::ExtractMatchPositions(const std::string& offsets_str,
if (offsets_str.empty())
return;
std::vector<std::string> offsets;
- SplitString(offsets_str, ' ', &offsets);
+ base::SplitString(offsets_str, ' ', &offsets);
// SQLite offsets are sets of four integers:
// column, query term, match offset, match length
// Matches within a string are marked by (start, end) pairs.
diff --git a/chrome/browser/history/snippet_unittest.cc b/chrome/browser/history/snippet_unittest.cc
index 75f627a..ad174f1 100644
--- a/chrome/browser/history/snippet_unittest.cc
+++ b/chrome/browser/history/snippet_unittest.cc
@@ -98,7 +98,7 @@ string16 BuildSnippet(const std::string& document,
const std::string document_folded = StringToLowerASCII(std::string(document));
std::vector<std::string> query_words;
- SplitString(query, ' ', &query_words);
+ base::SplitString(query, ' ', &query_words);
// Manually construct match_positions of the document.
Snippet::MatchPositions match_positions;
diff --git a/chrome/browser/importer/firefox2_importer.cc b/chrome/browser/importer/firefox2_importer.cc
index d7932b8..a6b6534 100644
--- a/chrome/browser/importer/firefox2_importer.cc
+++ b/chrome/browser/importer/firefox2_importer.cc
@@ -105,7 +105,7 @@ void Firefox2Importer::LoadDefaultBookmarks(const FilePath& app_path,
std::string content;
file_util::ReadFileToString(file, &content);
std::vector<std::string> lines;
- SplitString(content, '\n', &lines);
+ base::SplitString(content, '\n', &lines);
std::string charset;
for (size_t i = 0; i < lines.size(); ++i) {
@@ -160,7 +160,7 @@ void Firefox2Importer::ImportBookmarksFile(
std::string content;
file_util::ReadFileToString(file_path, &content);
std::vector<std::string> lines;
- SplitString(content, '\n', &lines);
+ base::SplitString(content, '\n', &lines);
std::vector<ProfileWriter::BookmarkEntry> toolbar_bookmarks;
std::wstring last_folder = first_folder_name;
diff --git a/chrome/browser/importer/firefox_importer_utils.cc b/chrome/browser/importer/firefox_importer_utils.cc
index 6ff1798..3552b7a 100644
--- a/chrome/browser/importer/firefox_importer_utils.cc
+++ b/chrome/browser/importer/firefox_importer_utils.cc
@@ -99,7 +99,7 @@ bool GetFirefoxVersionAndPathFromProfile(const FilePath& profile_path,
file_util::ReadFileToString(compatibility_file, &content);
ReplaceSubstringsAfterOffset(&content, 0, "\r\n", "\n");
std::vector<std::string> lines;
- SplitString(content, '\n', &lines);
+ base::SplitString(content, '\n', &lines);
for (size_t i = 0; i < lines.size(); ++i) {
const std::string& line = lines[i];
@@ -130,7 +130,7 @@ void ParseProfileINI(const FilePath& file, DictionaryValue* root) {
file_util::ReadFileToString(file, &content);
ReplaceSubstringsAfterOffset(&content, 0, "\r\n", "\n");
std::vector<std::string> lines;
- SplitString(content, '\n', &lines);
+ base::SplitString(content, '\n', &lines);
// Parses the file.
root->Clear();
@@ -345,7 +345,7 @@ bool IsDefaultHomepage(const GURL& homepage, const FilePath& app_path) {
// Crack the string into separate homepage urls.
std::vector<std::string> urls;
- SplitString(default_homepages, '|', &urls);
+ base::SplitString(default_homepages, '|', &urls);
for (size_t i = 0; i < urls.size(); ++i) {
if (homepage.spec() == GURL(urls[i]).spec())
diff --git a/chrome/browser/importer/ie_importer.cc b/chrome/browser/importer/ie_importer.cc
index cbea511..ef93a52 100644
--- a/chrome/browser/importer/ie_importer.cc
+++ b/chrome/browser/importer/ie_importer.cc
@@ -190,7 +190,7 @@ void IEImporter::ImportPasswordsIE6() {
ac.key.erase(i);
ac.is_url = (ac.key.find(L"://") != std::wstring::npos);
ac_list.push_back(ac);
- SplitString(data, L'\0', &ac_list[ac_list.size() - 1].data);
+ base::SplitString(data, L'\0', &ac_list[ac_list.size() - 1].data);
}
CoTaskMemFree(buffer);
}
diff --git a/chrome/browser/importer/nss_decryptor.cc b/chrome/browser/importer/nss_decryptor.cc
index 98522c6..2a95d0e 100644
--- a/chrome/browser/importer/nss_decryptor.cc
+++ b/chrome/browser/importer/nss_decryptor.cc
@@ -119,7 +119,7 @@ void NSSDecryptor::ParseSignons(const std::string& content,
// Splits the file content into lines.
std::vector<std::string> lines;
- SplitString(content, '\n', &lines);
+ base::SplitString(content, '\n', &lines);
// The first line is the file version. We skip the unknown versions.
if (lines.empty())
diff --git a/chrome/browser/importer/toolbar_importer.cc b/chrome/browser/importer/toolbar_importer.cc
index 5547a62..0aabcc6 100644
--- a/chrome/browser/importer/toolbar_importer.cc
+++ b/chrome/browser/importer/toolbar_importer.cc
@@ -43,7 +43,7 @@ bool toolbar_importer_utils::IsGoogleGAIACookieInstalled() {
options.set_include_httponly(); // The SID cookie might be httponly.
std::string cookies = store->GetCookiesWithOptions(url, options);
std::vector<std::string> cookie_list;
- SplitString(cookies, kSplitStringToken, &cookie_list);
+ base::SplitString(cookies, kSplitStringToken, &cookie_list);
for (std::vector<std::string>::iterator current = cookie_list.begin();
current != cookie_list.end();
++current) {
@@ -581,7 +581,7 @@ bool Toolbar5Importer::ExtractFoldersFromXmlReader(
// IE or Firefox folder. We undo the label creation and recreate the
// correct folder.
std::vector<std::wstring> folder_names;
- SplitString(label_vector[index], L':', &folder_names);
+ base::SplitString(label_vector[index], L':', &folder_names);
(*bookmark_folders)[index].insert((*bookmark_folders)[index].end(),
folder_names.begin(), folder_names.end());
}
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 292f9ca..0c9b114 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -271,7 +271,7 @@ net::HttpAuthHandlerFactory* IOThread::CreateDefaultAuthHandlerFactory(
csv_auth_schemes = StringToLowerASCII(
command_line.GetSwitchValueASCII(switches::kAuthSchemes));
std::vector<std::string> supported_schemes;
- SplitString(csv_auth_schemes, ',', &supported_schemes);
+ base::SplitString(csv_auth_schemes, ',', &supported_schemes);
return net::HttpAuthHandlerRegistryFactory::Create(
supported_schemes,
diff --git a/chrome/browser/language_combobox_model.cc b/chrome/browser/language_combobox_model.cc
index 747862c..216fed1 100644
--- a/chrome/browser/language_combobox_model.cc
+++ b/chrome/browser/language_combobox_model.cc
@@ -60,7 +60,7 @@ void LanguageList::InitNativeNames(
void LanguageList::CopySpecifiedLanguagesUp(const std::string& locale_codes) {
DCHECK(!locale_names_.empty());
std::vector<std::string> locale_codes_vector;
- SplitString(locale_codes, ',', &locale_codes_vector);
+ base::SplitString(locale_codes, ',', &locale_codes_vector);
for (size_t i = 0; i != locale_codes_vector.size(); i++) {
const int locale_index = GetIndexFromLocale(locale_codes_vector[i]);
CHECK_NE(locale_index, -1);
diff --git a/chrome/browser/language_order_table_model.cc b/chrome/browser/language_order_table_model.cc
index 0598912..a57a1d7 100644
--- a/chrome/browser/language_order_table_model.cc
+++ b/chrome/browser/language_order_table_model.cc
@@ -111,7 +111,7 @@ int LanguageOrderTableModel::RowCount() {
void LanguageOrderTableModel::ListToVector(const std::string& list,
std::vector<std::string>* vector) {
- SplitString(list, ',', vector);
+ base::SplitString(list, ',', vector);
}
std::string LanguageOrderTableModel::VectorToList(
diff --git a/chrome/browser/password_manager/password_form_manager.cc b/chrome/browser/password_manager/password_form_manager.cc
index 81ba774..e268317 100644
--- a/chrome/browser/password_manager/password_form_manager.cc
+++ b/chrome/browser/password_manager/password_form_manager.cc
@@ -34,7 +34,7 @@ PasswordFormManager::PasswordFormManager(Profile* profile,
submit_result_(kSubmitResultNotSubmitted) {
DCHECK(profile_);
if (observed_form_.origin.is_valid())
- SplitString(observed_form_.origin.path(), '/', &form_path_tokens_);
+ base::SplitString(observed_form_.origin.path(), '/', &form_path_tokens_);
observed_form_.ssl_valid = ssl_valid;
}
@@ -453,7 +453,7 @@ int PasswordFormManager::ScoreResult(const PasswordForm& candidate) const {
// Walk the origin URL paths one directory at a time to see how
// deep the two match.
std::vector<std::string> candidate_path_tokens;
- SplitString(candidate.origin.path(), '/', &candidate_path_tokens);
+ base::SplitString(candidate.origin.path(), '/', &candidate_path_tokens);
size_t depth = 0;
size_t max_dirs = std::min(form_path_tokens_.size(),
candidate_path_tokens.size());
diff --git a/chrome/browser/process_singleton_linux.cc b/chrome/browser/process_singleton_linux.cc
index f537dba..fe537d2 100644
--- a/chrome/browser/process_singleton_linux.cc
+++ b/chrome/browser/process_singleton_linux.cc
@@ -710,7 +710,7 @@ void ProcessSingleton::LinuxWatcher::SocketReader::OnFileCanReadWithoutBlocking(
std::string str(buf_, bytes_read_);
std::vector<std::string> tokens;
- SplitString(str, kTokenDelimiter, &tokens);
+ base::SplitString(str, kTokenDelimiter, &tokens);
if (tokens.size() < 3 || tokens[0] != kStartToken) {
LOG(ERROR) << "Wrong message format: " << str;
diff --git a/chrome/browser/safe_browsing/chunk_range.cc b/chrome/browser/safe_browsing/chunk_range.cc
index 1cb52d6..101cb5a 100644
--- a/chrome/browser/safe_browsing/chunk_range.cc
+++ b/chrome/browser/safe_browsing/chunk_range.cc
@@ -78,11 +78,11 @@ bool StringToRanges(const std::string& input,
// Crack the string into chunk parts, then crack each part looking for a
// range.
std::vector<std::string> chunk_parts;
- SplitString(input, ',', &chunk_parts);
+ base::SplitString(input, ',', &chunk_parts);
for (size_t i = 0; i < chunk_parts.size(); ++i) {
std::vector<std::string> chunk_ranges;
- SplitString(chunk_parts[i], '-', &chunk_ranges);
+ base::SplitString(chunk_parts[i], '-', &chunk_ranges);
int start = atoi(chunk_ranges[0].c_str());
int stop = start;
if (chunk_ranges.size() == 2)
diff --git a/chrome/browser/safe_browsing/protocol_parser.cc b/chrome/browser/safe_browsing/protocol_parser.cc
index c022da4..36f9a74 100644
--- a/chrome/browser/safe_browsing/protocol_parser.cc
+++ b/chrome/browser/safe_browsing/protocol_parser.cc
@@ -83,7 +83,7 @@ bool SafeBrowsingProtocolParser::ParseGetHash(
length -= offset;
std::vector<std::string> cmd_parts;
- SplitString(line, ':', &cmd_parts);
+ base::SplitString(line, ':', &cmd_parts);
if (cmd_parts.size() != 3)
return false;
@@ -151,7 +151,7 @@ bool SafeBrowsingProtocolParser::ParseUpdate(
return false; // Error: bad list format!
std::vector<std::string> cmd_parts;
- SplitString(cmd_line, ':', &cmd_parts);
+ base::SplitString(cmd_line, ':', &cmd_parts);
if (cmd_parts.empty())
return false;
const std::string& command = cmd_parts[0];
@@ -266,7 +266,7 @@ bool SafeBrowsingProtocolParser::ParseChunk(const char* data,
const int line_len = static_cast<int>(cmd_line.length()) + 1;
std::vector<std::string> cmd_parts;
- SplitString(cmd_line, ':', &cmd_parts);
+ base::SplitString(cmd_line, ':', &cmd_parts);
// Handle a possible re-key command.
if (cmd_parts.size() != 4) {
@@ -467,7 +467,7 @@ bool SafeBrowsingProtocolParser::ParseNewKey(const char* chunk_data,
return false;
std::vector<std::string> cmd_parts;
- SplitString(line, ':', &cmd_parts);
+ base::SplitString(line, ':', &cmd_parts);
if (cmd_parts.size() != 3)
return false;
diff --git a/chrome/browser/search_engines/template_url_model.cc b/chrome/browser/search_engines/template_url_model.cc
index aa543fb..57976f7 100644
--- a/chrome/browser/search_engines/template_url_model.cc
+++ b/chrome/browser/search_engines/template_url_model.cc
@@ -835,7 +835,7 @@ bool TemplateURLModel::LoadDefaultSearchProviderFromPrefs(
(*default_provider)->set_keyword(keyword);
(*default_provider)->SetFavIconURL(GURL(icon_url));
std::vector<std::string> encodings_vector;
- SplitString(encodings, ';', &encodings_vector);
+ base::SplitString(encodings, ';', &encodings_vector);
(*default_provider)->set_input_encodings(encodings_vector);
if (!id_string.empty()) {
int64 value;
diff --git a/chrome/browser/search_engines/template_url_model_unittest.cc b/chrome/browser/search_engines/template_url_model_unittest.cc
index 3027465..498d884 100644
--- a/chrome/browser/search_engines/template_url_model_unittest.cc
+++ b/chrome/browser/search_engines/template_url_model_unittest.cc
@@ -133,7 +133,7 @@ class TemplateURLModelTest : public testing::Test {
template_url->set_autogenerate_keyword(autogenerate_keyword);
template_url->set_short_name(short_name);
std::vector<std::string> encodings_vector;
- SplitString(encodings, ';', &encodings_vector);
+ base::SplitString(encodings, ';', &encodings_vector);
template_url->set_input_encodings(encodings_vector);
template_url->set_date_created(created_date);
template_url->set_safe_for_autoreplace(safe_for_autoreplace);
@@ -774,8 +774,8 @@ TEST_F(TemplateURLModelTest, BuildQueryTerms) {
if (data[i].result) {
std::vector<std::string> keys;
std::vector<std::string> values;
- SplitString(data[i].keys, ';', &keys);
- SplitString(data[i].values, ';', &values);
+ base::SplitString(data[i].keys, ';', &keys);
+ base::SplitString(data[i].values, ';', &values);
ASSERT_TRUE(keys.size() == values.size());
ASSERT_EQ(keys.size(), terms.size());
for (size_t j = 0; j < keys.size(); ++j) {
@@ -1129,7 +1129,7 @@ TEST_F(TemplateURLModelTest, TestManagedDefaultSearch) {
expected_managed_default1->SetFavIconURL(GURL(kIconURL));
expected_managed_default1->set_short_name(L"test1");
std::vector<std::string> encodings_vector;
- SplitString(kEncodings, ';', &encodings_vector);
+ base::SplitString(kEncodings, ';', &encodings_vector);
expected_managed_default1->set_input_encodings(encodings_vector);
expected_managed_default1->set_show_in_default_list(true);
const TemplateURL* actual_managed_default =
diff --git a/chrome/browser/spellcheck_host.cc b/chrome/browser/spellcheck_host.cc
index 2d4bef545..545eaaa 100644
--- a/chrome/browser/spellcheck_host.cc
+++ b/chrome/browser/spellcheck_host.cc
@@ -125,7 +125,7 @@ int SpellCheckHost::GetSpellCheckLanguages(
if (SpellCheckerPlatform::SpellCheckerAvailable())
SpellCheckerPlatform::GetAvailableLanguages(&accept_languages);
else
- SplitString(accept_languages_pref.GetValue(), ',', &accept_languages);
+ base::SplitString(accept_languages_pref.GetValue(), ',', &accept_languages);
for (std::vector<std::string>::const_iterator i = accept_languages.begin();
i != accept_languages.end(); ++i) {
@@ -189,7 +189,7 @@ void SpellCheckHost::InitializeInternal() {
std::string contents;
file_util::ReadFileToString(custom_dictionary_file_, &contents);
std::vector<std::string> list_of_words;
- SplitString(contents, '\n', &list_of_words);
+ base::SplitString(contents, '\n', &list_of_words);
for (size_t i = 0; i < list_of_words.size(); ++i)
custom_words_.push_back(list_of_words[i]);
}
diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc
index 8c43916..df5db9e 100644
--- a/chrome/browser/translate/translate_manager.cc
+++ b/chrome/browser/translate/translate_manager.cc
@@ -547,7 +547,7 @@ void TranslateManager::InitAcceptLanguages(PrefService* prefs) {
std::string accept_langs_str = prefs->GetString(prefs::kAcceptLanguages);
std::vector<std::string> accept_langs_list;
LanguageSet accept_langs_set;
- SplitString(accept_langs_str, ',', &accept_langs_list);
+ base::SplitString(accept_langs_str, ',', &accept_langs_list);
std::vector<std::string>::const_iterator iter;
std::string ui_lang =
GetLanguageCode(g_browser_process->GetApplicationLocale());
diff --git a/chrome/browser/views/shell_dialogs_win.cc b/chrome/browser/views/shell_dialogs_win.cc
index bd7fb47..1a4d04a 100644
--- a/chrome/browser/views/shell_dialogs_win.cc
+++ b/chrome/browser/views/shell_dialogs_win.cc
@@ -309,7 +309,7 @@ bool SaveFileAsWithFilter(HWND owner,
// instance of null to get to "*.jpg".
std::vector<std::wstring> filters;
if (!filter.empty() && save_as.nFilterIndex > 0)
- SplitString(filter, '\0', &filters);
+ base::SplitString(filter, '\0', &filters);
std::wstring filter_selected;
if (!filters.empty())
filter_selected = filters[(2 * (save_as.nFilterIndex - 1)) + 1];
diff --git a/chrome/browser/webdata/web_database.cc b/chrome/browser/webdata/web_database.cc
index 6909e36..26b05c5 100644
--- a/chrome/browser/webdata/web_database.cc
+++ b/chrome/browser/webdata/web_database.cc
@@ -915,7 +915,7 @@ bool WebDatabase::GetKeywords(std::vector<TemplateURL*>* urls) {
template_url->set_usage_count(s.ColumnInt(8));
std::vector<std::string> encodings;
- SplitString(s.ColumnString(9), ';', &encodings);
+ base::SplitString(s.ColumnString(9), ';', &encodings);
template_url->set_input_encodings(encodings);
template_url->set_show_in_default_list(s.ColumnInt(10) == 1);
diff --git a/chrome/common/extensions/url_pattern.cc b/chrome/common/extensions/url_pattern.cc
index 62459a3..aa7e252 100644
--- a/chrome/common/extensions/url_pattern.cc
+++ b/chrome/common/extensions/url_pattern.cc
@@ -112,7 +112,7 @@ bool URLPattern::Parse(const std::string& pattern) {
// The first component can optionally be '*' to match all subdomains.
std::vector<std::string> host_components;
- SplitString(host_, '.', &host_components);
+ base::SplitString(host_, '.', &host_components);
if (host_components[0] == "*") {
match_subdomains_ = true;
host_components.erase(host_components.begin(),
diff --git a/chrome/common/pepper_plugin_registry.cc b/chrome/common/pepper_plugin_registry.cc
index 7243665..87a2bd3 100644
--- a/chrome/common/pepper_plugin_registry.cc
+++ b/chrome/common/pepper_plugin_registry.cc
@@ -75,17 +75,17 @@ void PepperPluginRegistry::GetPluginInfoFromSwitch(
// *1( LWS + ";" + LWS + <mime-type> )
std::vector<std::string> modules;
- SplitString(value, ',', &modules);
+ base::SplitString(value, ',', &modules);
for (size_t i = 0; i < modules.size(); ++i) {
std::vector<std::string> parts;
- SplitString(modules[i], ';', &parts);
+ base::SplitString(modules[i], ';', &parts);
if (parts.size() < 2) {
DLOG(ERROR) << "Required mime-type not found";
continue;
}
std::vector<std::string> name_parts;
- SplitString(parts[0], '#', &name_parts);
+ base::SplitString(parts[0], '#', &name_parts);
PepperPluginInfo plugin;
#if defined(OS_WIN)
diff --git a/chrome/common/zip.cc b/chrome/common/zip.cc
index 01de36f..3e24b53 100644
--- a/chrome/common/zip.cc
+++ b/chrome/common/zip.cc
@@ -49,7 +49,7 @@ static bool ExtractCurrentFile(unzFile zip_file,
if (filename.find(FILE_PATH_LITERAL("..")) != FilePath::StringType::npos)
return false;
- SplitString(filename, '/', &filename_parts);
+ base::SplitString(filename, '/', &filename_parts);
FilePath dest_file(dest_dir);
std::vector<FilePath::StringType>::iterator iter;
diff --git a/chrome/default_plugin/plugin_database_handler.cc b/chrome/default_plugin/plugin_database_handler.cc
index d6e06e8..aadcabc 100644
--- a/chrome/default_plugin/plugin_database_handler.cc
+++ b/chrome/default_plugin/plugin_database_handler.cc
@@ -346,8 +346,9 @@ bool PluginDatabaseHandler::ReadPluginInfo(_xmlNode* plugin_node,
plugin_detail->download_url =
reinterpret_cast<const char*>(plugin_download_url_val->content);
- SplitString(reinterpret_cast<const char*>(plugin_mime_type_vals->content),
- kMimeTypeSeparator, &plugin_detail->mime_types);
+ base::SplitString(
+ reinterpret_cast<const char*>(plugin_mime_type_vals->content),
+ kMimeTypeSeparator, &plugin_detail->mime_types);
plugin_detail->language =
reinterpret_cast<const char*>(plugin_lang_val->content);
diff --git a/chrome/installer/util/compat_checks.cc b/chrome/installer/util/compat_checks.cc
index 901e1ba..f84a27f 100644
--- a/chrome/installer/util/compat_checks.cc
+++ b/chrome/installer/util/compat_checks.cc
@@ -26,7 +26,7 @@ std::wstring GetSEPVersion() {
// does not fit the format.
bool ParseSEPVersion(const std::wstring& version, int* v0, int* v1, int* v2) {
std::vector<std::wstring> v;
- SplitString(version, L'.', &v);
+ base::SplitString(version, L'.', &v);
if (v.size() != 4)
return false;
if (!base::StringToInt(v[0], v0))
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index 8470a31..f8c3b27 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -365,8 +365,8 @@ bool AnotherUserHasDefaultBrowser(const std::wstring& chrome_exe) {
return false;
std::vector<std::wstring> v1, v2;
- SplitString(registry_chrome_exe, L'\\', &v1);
- SplitString(chrome_exe, L'\\', &v2);
+ base::SplitString(registry_chrome_exe, L'\\', &v1);
+ base::SplitString(chrome_exe, L'\\', &v2);
if (v1.size() == 0 || v2.size() == 0 || v1.size() != v2.size())
return false;
diff --git a/chrome/installer/util/version.cc b/chrome/installer/util/version.cc
index ab9e450..7618e7d 100644
--- a/chrome/installer/util/version.cc
+++ b/chrome/installer/util/version.cc
@@ -40,7 +40,7 @@ bool installer::Version::IsHigherThan(const installer::Version* other) const {
installer::Version* installer::Version::GetVersionFromString(
const string16& version_str) {
std::vector<string16> numbers;
- SplitString(version_str, '.', &numbers);
+ base::SplitString(version_str, '.', &numbers);
if (numbers.size() != 4) {
LOG(ERROR) << "Invalid version string: " << version_str;
diff --git a/chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc b/chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc
index ed0fa79..d82734c 100644
--- a/chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc
+++ b/chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc
@@ -125,8 +125,8 @@ TEST(SpellcheckWordIteratorTest, SplitWord) {
kTestCases[i].allow_contraction));
std::vector<string16> expected_words;
- SplitString(WideToUTF16(kTestCases[i].expected_words), ' ',
- &expected_words);
+ base::SplitString(
+ WideToUTF16(kTestCases[i].expected_words), ' ', &expected_words);
string16 actual_word;
int actual_start, actual_end;
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index de4381d..fe7e90b 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -257,7 +257,7 @@ static bool SilverlightColorIsTransparent(const std::string& color) {
return false;
std::string value_string = color.substr(3, std::string::npos);
std::vector<std::string> components;
- SplitString(value_string, ',', &components);
+ base::SplitString(value_string, ',', &components);
if (components.size() == 4 && !StartsWithASCII(components[0], "1", false))
return true;
} else if (LowerCaseEqualsASCII(color, "transparent")) {
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc
index 4436867..047c18a 100644
--- a/chrome/test/automated_ui_tests/automated_ui_tests.cc
+++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc
@@ -153,7 +153,7 @@ void AutomatedUITest::RunReproduction() {
&num_reproductions);
}
std::vector<std::string> actions;
- SplitString(action_string, ',', &actions);
+ base::SplitString(action_string, ',', &actions);
bool did_crash = false;
bool command_complete = false;
diff --git a/chrome/test/chrome_process_util_mac.cc b/chrome/test/chrome_process_util_mac.cc
index c4f12fd..1233250 100644
--- a/chrome/test/chrome_process_util_mac.cc
+++ b/chrome/test/chrome_process_util_mac.cc
@@ -37,14 +37,14 @@ MacChromeProcessInfoList GetRunningMacProcessInfo(
// Process the results
std::vector<std::string> ps_output_lines;
- SplitString(ps_output, '\n', &ps_output_lines);
+ base::SplitString(ps_output, '\n', &ps_output_lines);
std::vector<std::string>::const_iterator line_iter;
for (line_iter = ps_output_lines.begin();
line_iter != ps_output_lines.end();
++line_iter) {
std::string line(CollapseWhitespaceASCII(*line_iter, false));
std::vector<std::string> values;
- SplitString(line, ' ', &values);
+ base::SplitString(line, ' ', &values);
if (values.size() == 3) {
MacChromeProcessInfo proc_info;
int pid;
diff --git a/chrome/test/selenium/selenium_test.cc b/chrome/test/selenium/selenium_test.cc
index 296d925..071272d 100644
--- a/chrome/test/selenium/selenium_test.cc
+++ b/chrome/test/selenium/selenium_test.cc
@@ -53,7 +53,7 @@ class SeleniumTest : public UITest {
return;
std::vector<std::string> tokens;
- SplitString(input, ',', &tokens);
+ base::SplitString(input, ',', &tokens);
for (size_t i = 0; i < tokens.size(); ++i) {
TrimWhitespaceASCII(tokens[i], TRIM_ALL, &tokens[i]);
output->insert(tokens[i]);
diff --git a/chrome/test/startup/startup_test.cc b/chrome/test/startup/startup_test.cc
index 743b820..5fa9380 100644
--- a/chrome/test/startup/startup_test.cc
+++ b/chrome/test/startup/startup_test.cc
@@ -160,7 +160,7 @@ class StartupTest : public UIPerfTest {
{
std::string server_version = automation()->server_version();
std::vector<std::string> version_numbers;
- SplitString(server_version, '.', &version_numbers);
+ base::SplitString(server_version, '.', &version_numbers);
int chrome_buildnum = 0;
ASSERT_TRUE(base::StringToInt(version_numbers[2], &chrome_buildnum));
if (chrome_buildnum < 368) {
diff --git a/chrome/test/ui/dom_checker_uitest.cc b/chrome/test/ui/dom_checker_uitest.cc
index 1200c97..f299958 100644
--- a/chrome/test/ui/dom_checker_uitest.cc
+++ b/chrome/test/ui/dom_checker_uitest.cc
@@ -120,7 +120,7 @@ class DomCheckerTest : public UITest {
return;
std::vector<std::string> tokens;
- SplitString(input, '\n', &tokens);
+ base::SplitString(input, '\n', &tokens);
std::vector<std::string>::const_iterator it = tokens.begin();
for (; it != tokens.end(); ++it) {
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index e026e5a..58a1007 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -724,7 +724,7 @@ bool UITestBase::LaunchBrowserHelper(const CommandLine& arguments,
if (!extra_chrome_flags.empty()) {
// Split by spaces and append to command line
std::vector<CommandLine::StringType> flags;
- SplitString(extra_chrome_flags, ' ', &flags);
+ base::SplitString(extra_chrome_flags, ' ', &flags);
for (size_t i = 0; i < flags.size(); ++i)
command_line.AppendArgNative(flags[i]);
}
diff --git a/chrome/test/webdriver/dispatch.h b/chrome/test/webdriver/dispatch.h
index d85514a..61f877b 100644
--- a/chrome/test/webdriver/dispatch.h
+++ b/chrome/test/webdriver/dispatch.h
@@ -49,7 +49,7 @@ void Dispatch(struct mg_connection* connection,
std::vector<std::string> path_segments;
std::string uri(request_info->uri);
- SplitString(uri, '/', &path_segments);
+ base::SplitString(uri, '/', &path_segments);
DictionaryValue* parameters = NULL;
if ((method == "POST" || method == "PUT") &&
diff --git a/chrome/tools/convert_dict/aff_reader.cc b/chrome/tools/convert_dict/aff_reader.cc
index 6e558f4..f9869b3 100644
--- a/chrome/tools/convert_dict/aff_reader.cc
+++ b/chrome/tools/convert_dict/aff_reader.cc
@@ -221,7 +221,7 @@ void AffReader::AddAffix(std::string* rule) {
// a compound flag as listed below.
// AFX D 0 d/M e
std::vector<std::string> tokens;
- SplitString(part, ' ', &tokens);
+ base::SplitString(part, ' ', &tokens);
if (tokens.size() >= 5) {
part = StringPrintf("%s %s/%s %s",
tokens[0].c_str(),
@@ -248,7 +248,7 @@ void AffReader::AddAffix(std::string* rule) {
// After the slash are both the flags, then whitespace, then the part
// that tells us what to strip.
std::vector<std::string> after_slash;
- SplitString(part.substr(slash_index + 1), ' ', &after_slash);
+ base::SplitString(part.substr(slash_index + 1), ' ', &after_slash);
if (after_slash.size() < 2) {
// Note that we may get a third term here which is the
// morphological description of this rule. This happens in the tests
@@ -287,7 +287,7 @@ void AffReader::AddReplacement(std::string* rule) {
return;
std::vector<std::string> split;
- SplitString(utf8rule, ' ', &split);
+ base::SplitString(utf8rule, ' ', &split);
// There should be two parts.
if (split.size() != 2)
diff --git a/chrome_frame/chrome_frame_activex.cc b/chrome_frame/chrome_frame_activex.cc
index 5aa9294..f137aad 100644
--- a/chrome_frame/chrome_frame_activex.cc
+++ b/chrome_frame/chrome_frame_activex.cc
@@ -445,10 +445,10 @@ HRESULT ChromeFrameActivex::IOleObject_SetClientSite(
std::string automated_functions(
WideToASCII(static_cast<BSTR>(automated_functions_arg)));
functions_enabled_.clear();
- // SplitString writes one empty entry for blank strings, so we need this
- // to allow specifying zero automation of API functions.
+ // base::SplitString writes one empty entry for blank strings, so we
+ // need this to allow specifying zero automation of API functions.
if (!automated_functions.empty())
- SplitString(automated_functions, ',', &functions_enabled_);
+ base::SplitString(automated_functions, ',', &functions_enabled_);
}
ScopedBstr profile_name_arg;
diff --git a/chrome_frame/chrome_frame_npapi.cc b/chrome_frame/chrome_frame_npapi.cc
index a4079ca..93b53b0 100644
--- a/chrome_frame/chrome_frame_npapi.cc
+++ b/chrome_frame/chrome_frame_npapi.cc
@@ -212,10 +212,10 @@ bool ChromeFrameNPAPI::Initialize(NPMIMEType mime_type, NPP instance,
} else if (LowerCaseEqualsASCII(argn[i],
kPluginChromeFunctionsAutomatedAttribute)) {
functions_enabled_.clear();
- // SplitString writes one empty entry for blank strings, so we need this
- // to allow specifying zero automation of API functions.
+ // base::SplitString writes one empty entry for blank strings, so we need
+ // this to allow specifying zero automation of API functions.
if (argv[i][0] != '\0')
- SplitString(argv[i], ',', &functions_enabled_);
+ base::SplitString(argv[i], ',', &functions_enabled_);
} else if (LowerCaseEqualsASCII(argn[i], kPluginUseChromeNetwork)) {
chrome_network_arg_set = true;
chrome_network_arg = atoi(argv[i]) ? true : false;
@@ -1321,10 +1321,10 @@ bool ChromeFrameNPAPI::enableExtensionAutomation(NPObject* npobject,
std::string functions_a(functions_str.UTF8Characters,
functions_str.UTF8Length);
- // SplitString writes one empty entry for blank strings, so we need this
- // to allow specifying zero automation of API functions.
+ // base::SplitString writes one empty entry for blank strings, so we need
+ // this to allow specifying zero automation of API functions.
if (functions_a[0] != '\0')
- SplitString(functions_a, ',', &functions);
+ base::SplitString(functions_a, ',', &functions);
}
automation_client_->tab()->SetEnableExtensionAutomation(functions);
diff --git a/chrome_frame/metrics_service.cc b/chrome_frame/metrics_service.cc
index b78f71a..9d135a7 100644
--- a/chrome_frame/metrics_service.cc
+++ b/chrome_frame/metrics_service.cc
@@ -168,7 +168,7 @@ class ChromeFrameUploadRequestContext : public URLRequestContext {
std::string csv_auth_schemes = "basic,digest,ntlm,negotiate";
std::vector<std::string> supported_schemes;
- SplitString(csv_auth_schemes, ',', &supported_schemes);
+ base::SplitString(csv_auth_schemes, ',', &supported_schemes);
http_auth_handler_factory_ = net::HttpAuthHandlerRegistryFactory::Create(
supported_schemes, url_security_manager_.get(), host_resolver_, false,
diff --git a/net/base/host_mapping_rules.cc b/net/base/host_mapping_rules.cc
index a1ec12d0..effea59 100644
--- a/net/base/host_mapping_rules.cc
+++ b/net/base/host_mapping_rules.cc
@@ -69,7 +69,7 @@ bool HostMappingRules::AddRuleFromString(const std::string& rule_string) {
std::string trimmed;
TrimWhitespaceASCII(rule_string, TRIM_ALL, &trimmed);
std::vector<std::string> parts;
- SplitString(trimmed, ' ', &parts);
+ base::SplitString(trimmed, ' ', &parts);
// Test for EXCLUSION rule.
if (parts.size() == 2 && LowerCaseEqualsASCII(parts[0], "exclude")) {
diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc
index 62f164b..a580997 100644
--- a/net/base/mime_util.cc
+++ b/net/base/mime_util.cc
@@ -430,7 +430,7 @@ void MimeUtil::ParseCodecString(const std::string& codecs,
bool strip) {
std::string no_quote_codecs;
TrimString(codecs, "\"", &no_quote_codecs);
- SplitString(no_quote_codecs, ',', codecs_out);
+ base::SplitString(no_quote_codecs, ',', codecs_out);
if (!strip)
return;
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index ddc1da7..9afae4c 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -1904,7 +1904,7 @@ bool ParseCIDRBlock(const std::string& cidr_literal,
// <IPv6-literal> "/" <number of bits>
std::vector<std::string> parts;
- SplitString(cidr_literal, '/', &parts);
+ base::SplitString(cidr_literal, '/', &parts);
if (parts.size() != 2)
return false;
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
diff --git a/net/http/http_network_layer.cc b/net/http/http_network_layer.cc
index a773ac46..cf93500 100644
--- a/net/http/http_network_layer.cc
+++ b/net/http/http_network_layer.cc
@@ -195,7 +195,7 @@ void HttpNetworkLayer::EnableSpdy(const std::string& mode) {
static const char kNpnProtosHttpOnly[] = "\x08http/1.1\x07http1.1";
std::vector<std::string> spdy_options;
- SplitString(mode, ',', &spdy_options);
+ base::SplitString(mode, ',', &spdy_options);
bool use_alt_protocols = true;
diff --git a/net/http/http_stream_factory.cc b/net/http/http_stream_factory.cc
index f471a4f..9378357 100644
--- a/net/http/http_stream_factory.cc
+++ b/net/http/http_stream_factory.cc
@@ -77,7 +77,7 @@ void HttpStreamFactory::ProcessAlternateProtocol(
const std::string& alternate_protocol_str,
const HostPortPair& http_host_port_pair) {
std::vector<std::string> port_protocol_vector;
- SplitString(alternate_protocol_str, ':', &port_protocol_vector);
+ base::SplitString(alternate_protocol_str, ':', &port_protocol_vector);
if (port_protocol_vector.size() != 2) {
DLOG(WARNING) << HttpAlternateProtocols::kHeader
<< " header has too many tokens: "
diff --git a/net/tools/hresolv/hresolv.cc b/net/tools/hresolv/hresolv.cc
index c5c1976..b5af4ae 100644
--- a/net/tools/hresolv/hresolv.cc
+++ b/net/tools/hresolv/hresolv.cc
@@ -382,7 +382,7 @@ bool ReadHostsAndTimesFromFile(const FilePath& path,
std::vector<std::string> lines;
// TODO(cbentzel): This should probably handle CRLF-style separators as well.
// Maybe it's worth adding functionality like this to base tools.
- SplitString(file_contents, '\n', &lines);
+ base::SplitString(file_contents, '\n', &lines);
std::vector<std::string>::const_iterator line_end = lines.end();
int previous_timestamp = 0;
for (std::vector<std::string>::const_iterator it = lines.begin();
diff --git a/net/websockets/websocket_job_unittest.cc b/net/websockets/websocket_job_unittest.cc
index 9fde6c9..53d4a625 100644
--- a/net/websockets/websocket_job_unittest.cc
+++ b/net/websockets/websocket_job_unittest.cc
@@ -328,7 +328,7 @@ TEST_F(WebSocketJobTest, SlowHandshake) {
"8jKS'y:G*Co,Wxa-";
std::vector<std::string> lines;
- SplitString(kHandshakeResponseMessage, '\n', &lines);
+ base::SplitString(kHandshakeResponseMessage, '\n', &lines);
for (size_t i = 0; i < lines.size() - 2; i++) {
std::string line = lines[i] + "\r\n";
SCOPED_TRACE("Line: " + line);
diff --git a/views/controls/label.cc b/views/controls/label.cc
index 0a9beac..6d979df 100644
--- a/views/controls/label.cc
+++ b/views/controls/label.cc
@@ -231,7 +231,7 @@ void Label::SizeToFit(int max_width) {
DCHECK(is_multi_line_);
std::vector<std::wstring> lines;
- SplitString(text_, L'\n', &lines);
+ base::SplitString(text_, L'\n', &lines);
int label_width = 0;
for (std::vector<std::wstring>::const_iterator iter = lines.begin();
diff --git a/webkit/glue/plugins/plugin_lib_mac.mm b/webkit/glue/plugins/plugin_lib_mac.mm
index 07da77c..bd2bcbb 100644
--- a/webkit/glue/plugins/plugin_lib_mac.mm
+++ b/webkit/glue/plugins/plugin_lib_mac.mm
@@ -200,8 +200,8 @@ bool ReadSTRPluginInfo(const FilePath& filename, CFBundleRef bundle,
mime.mime_type = StringToLowerASCII(type_strings[2*i]);
if (have_type_descs && i < type_descs.size())
mime.description = UTF8ToUTF16(type_descs[i]);
- SplitString(StringToLowerASCII(type_strings[2*i+1]), ',',
- &mime.file_extensions);
+ base::SplitString(
+ StringToLowerASCII(type_strings[2*i+1]), ',', &mime.file_extensions);
info->mime_types.push_back(mime);
}
diff --git a/webkit/glue/plugins/plugin_lib_posix.cc b/webkit/glue/plugins/plugin_lib_posix.cc
index fb813b6..ac937e1 100644
--- a/webkit/glue/plugins/plugin_lib_posix.cc
+++ b/webkit/glue/plugins/plugin_lib_posix.cc
@@ -235,7 +235,7 @@ void PluginLib::ParseMIMEDescription(
if (end == std::string::npos)
break;
const std::string extensions = description.substr(ofs, end - ofs);
- SplitString(extensions, ',', &mime_type.file_extensions);
+ base::SplitString(extensions, ',', &mime_type.file_extensions);
ofs = end + 1;
end = description.find(';', ofs);
diff --git a/webkit/glue/plugins/plugin_list.cc b/webkit/glue/plugins/plugin_list.cc
index 2669af5..4b3ce27 100644
--- a/webkit/glue/plugins/plugin_list.cc
+++ b/webkit/glue/plugins/plugin_list.cc
@@ -116,9 +116,9 @@ bool PluginList::CreateWebPluginInfo(const PluginVersionInfo& pvi,
WebPluginInfo* info) {
std::vector<std::string> mime_types, file_extensions;
std::vector<string16> descriptions;
- SplitString(WideToUTF8(pvi.mime_types), '|', &mime_types);
- SplitString(WideToUTF8(pvi.file_extensions), '|', &file_extensions);
- SplitString(WideToUTF16(pvi.type_descriptions), '|', &descriptions);
+ base::SplitString(WideToUTF8(pvi.mime_types), '|', &mime_types);
+ base::SplitString(WideToUTF8(pvi.file_extensions), '|', &file_extensions);
+ base::SplitString(WideToUTF16(pvi.type_descriptions), '|', &descriptions);
info->mime_types.clear();
@@ -138,7 +138,7 @@ bool PluginList::CreateWebPluginInfo(const PluginVersionInfo& pvi,
WebPluginMimeType mime_type;
mime_type.mime_type = StringToLowerASCII(mime_types[i]);
if (file_extensions.size() > i)
- SplitString(file_extensions[i], ',', &mime_type.file_extensions);
+ base::SplitString(file_extensions[i], ',', &mime_type.file_extensions);
if (descriptions.size() > i) {
mime_type.description = descriptions[i];
@@ -369,7 +369,8 @@ void PluginList::GetPluginInfoArray(const GURL& url,
const std::string& mime_type,
bool allow_wildcard,
std::vector<WebPluginInfo>* info,
- std::vector<std::string>* actual_mime_types) {
+ std::vector<std::string>* actual_mime_types)
+{
DCHECK(mime_type == StringToLowerASCII(mime_type));
DCHECK(info);
@@ -454,7 +455,8 @@ bool PluginList::GetPluginInfo(const GURL& url,
// NULL for the mime type list...
if (actual_mime_type) {
std::vector<std::string> mime_type_list;
- GetPluginInfoArray(url, mime_type, allow_wildcard, &info_list, &mime_type_list);
+ GetPluginInfoArray(
+ url, mime_type, allow_wildcard, &info_list, &mime_type_list);
if (!info_list.empty()) {
*info = info_list[0];
*actual_mime_type = mime_type_list[0];
diff --git a/webkit/glue/plugins/plugin_list_posix.cc b/webkit/glue/plugins/plugin_list_posix.cc
index b23909b..72891d1 100644
--- a/webkit/glue/plugins/plugin_list_posix.cc
+++ b/webkit/glue/plugins/plugin_list_posix.cc
@@ -133,7 +133,7 @@ void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
const char* moz_plugin_path = getenv("MOZ_PLUGIN_PATH");
if (moz_plugin_path) {
std::vector<std::string> paths;
- SplitString(moz_plugin_path, ':', &paths);
+ base::SplitString(moz_plugin_path, ':', &paths);
for (size_t i = 0; i < paths.size(); ++i)
plugin_dirs->push_back(FilePath(paths[i]));
}
diff --git a/webkit/glue/plugins/plugin_list_win.cc b/webkit/glue/plugins/plugin_list_win.cc
index b5ded9e..e515e10 100644
--- a/webkit/glue/plugins/plugin_list_win.cc
+++ b/webkit/glue/plugins/plugin_list_win.cc
@@ -304,13 +304,13 @@ bool HaveSharedMimeType(const WebPluginInfo& plugin1,
// version is newer than a's, or false if it's equal or older.
bool IsNewerVersion(const std::wstring& a, const std::wstring& b) {
std::vector<std::wstring> a_ver, b_ver;
- SplitString(a, ',', &a_ver);
- SplitString(b, ',', &b_ver);
+ base::SplitString(a, ',', &a_ver);
+ base::SplitString(b, ',', &b_ver);
if (a_ver.size() == 1 && b_ver.size() == 1) {
a_ver.clear();
b_ver.clear();
- SplitString(a, '.', &a_ver);
- SplitString(b, '.', &b_ver);
+ base::SplitString(a, '.', &a_ver);
+ base::SplitString(b, '.', &b_ver);
}
if (a_ver.size() != b_ver.size())
return false;
@@ -371,7 +371,7 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info,
// and don't depend on XPCOM.
if (filename == kJavaPlugin1 || filename == kJavaPlugin2) {
std::vector<std::wstring> ver;
- SplitString(info.version, '.', &ver);
+ base::SplitString(info.version, '.', &ver);
int major, minor, update;
if (ver.size() == 4 &&
base::StringToInt(ver[0], &major) &&
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_win.cc b/webkit/glue/plugins/webplugin_delegate_impl_win.cc
index 8c88680..2a10775 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_win.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl_win.cc
@@ -289,7 +289,7 @@ WebPluginDelegateImpl::WebPluginDelegateImpl(
} else if (filename == kAcrobatReaderPlugin) {
// Check for the version number above or equal 9.
std::vector<std::wstring> version;
- SplitString(plugin_info.version, L'.', &version);
+ base::SplitString(plugin_info.version, L'.', &version);
if (version.size() > 0) {
int major;
base::StringToInt(version[0], &major);