summaryrefslogtreecommitdiffstats
path: root/chrome/browser
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 /chrome/browser
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 'chrome/browser')
-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
36 files changed, 58 insertions, 57 deletions
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);