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

Unified Diff: chrome/browser/spellchecker/spellcheck_custom_dictionary.cc

Issue 1240183002: Update SplitString calls in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
index eec86b567f0cc94442e3dd035ab57768273e2c72..55390f91954ea273f0b7c0a51aa93e5a764b99d5 100644
--- a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
+++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
@@ -68,9 +68,10 @@ ChecksumStatus LoadFile(const base::FilePath& file_path,
if (checksum != base::MD5String(contents))
return INVALID_CHECKSUM;
}
- base::TrimWhitespaceASCII(contents, base::TRIM_ALL, &contents);
- std::vector<std::string> word_list;
- base::SplitString(contents, '\n', &word_list);
+
+ std::vector<std::string> word_list = base::SplitString(
+ base::TrimWhitespaceASCII(contents, base::TRIM_ALL), "\n",
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
words->insert(word_list.begin(), word_list.end());
return VALID_CHECKSUM;
}
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_test.cc ('k') | chrome/browser/spellchecker/spellcheck_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698