diff options
Diffstat (limited to 'chrome')
54 files changed, 85 insertions, 83 deletions
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) |