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

Unified Diff: chrome/renderer/spellchecker/custom_dictionary_engine.cc

Issue 15940004: Add HasWord(string) method to SpellcheckCustomDictionary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Attempt to fix android compile again Created 7 years, 7 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/renderer/spellchecker/custom_dictionary_engine.cc
diff --git a/chrome/renderer/spellchecker/custom_dictionary_engine.cc b/chrome/renderer/spellchecker/custom_dictionary_engine.cc
index 06c4abdd0a6733c9572f009da8b14275a8f084a3..66127298776890115f2308d688a3d6e3d63beec4 100644
--- a/chrome/renderer/spellchecker/custom_dictionary_engine.cc
+++ b/chrome/renderer/spellchecker/custom_dictionary_engine.cc
@@ -13,13 +13,12 @@ CustomDictionaryEngine::CustomDictionaryEngine() {
CustomDictionaryEngine::~CustomDictionaryEngine() {
}
-void CustomDictionaryEngine::Init(
- const std::vector<std::string>& custom_words) {
+void CustomDictionaryEngine::Init(const std::set<std::string>& custom_words) {
// SpellingMenuOberver calls UTF16ToUTF8(word) to convert words for storage,
// synchronization, and use in the custom dictionary engine. Since
// (UTF8ToUTF16(UTF16ToUTF8(word)) == word) holds, the engine does not need to
// normalize the strings.
- for (std::vector<std::string>::const_iterator it = custom_words.begin();
+ for (std::set<std::string>::const_iterator it = custom_words.begin();
it != custom_words.end();
++it) {
dictionary_.insert(UTF8ToUTF16(*it));

Powered by Google App Engine
This is Rietveld 408576698