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

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

Issue 11280013: Unit-tests for removing words from the dictionary (Closed) Base URL: http://git.chromium.org/chromium/src.git@dictionary
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1d8ce849a9c0aec18c9d422a8e5e469b2e34a4a1..b793b27ab9d307ac3ce32e47f4e30633f19593e1 100644
--- a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
+++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
@@ -49,8 +49,10 @@ void SpellcheckCustomDictionary::LoadDictionaryIntoCustomWordList(
std::string contents;
file_util::ReadFileToString(custom_dictionary_path_, &contents);
- if (contents.empty())
+ if (contents.empty()) {
+ custom_words->clear();
return;
+ }
base::SplitString(contents, '\n', custom_words);
// Clear out empty words.
« no previous file with comments | « no previous file | chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698