Add HasWord(string) method to SpellcheckCustomDictionary
commit6da98fc10000c9eb47b9552ea2b3a6ed9f07eff2
authorrouslan@chromium.org <rouslan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 29 May 2013 00:47:54 +0000 (29 00:47 +0000)
committerrouslan@chromium.org <rouslan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 29 May 2013 00:47:54 +0000 (29 00:47 +0000)
treeb80be8edaeae352bcdfe0b15e9cfc70b17531ef6
parent68d56418aaeaf2abf5f69935b7f95f7c6e519048
Add HasWord(string) method to SpellcheckCustomDictionary

This CL adds a method HasWord(string) to SpellcheckCustomDictionary and changes
the internal data structure in SpellcheckCustomDictionary from a vector to a set
for more efficient querying. Spelling service client will use the new method to
send IN_DICTIONARY feedback to spelling service for words that are in user's
custom spellcheck dictionary. Spelling service client will use this method in
upcoming CLs.

This CL also modifies IPC message "SpellCheckMsg_Init" to pass a set instead of
a vector of custom dictionary words. The browser sends this message to the
renderer to initialize spellcheck.

BUG=170514

Review URL: https://chromiumcodereview.appspot.com/15940004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202722 0039d316-1c4b-4281-b951-d872f2087c98
13 files changed:
chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
chrome/browser/spellchecker/spellcheck_custom_dictionary.h
chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
chrome/browser/sync/test/integration/dictionary_helper.cc
chrome/browser/ui/webui/options/language_dictionary_overlay_handler.cc
chrome/common/spellcheck_common.h
chrome/common/spellcheck_messages.h
chrome/renderer/spellchecker/custom_dictionary_engine.cc
chrome/renderer/spellchecker/custom_dictionary_engine.h
chrome/renderer/spellchecker/custom_dictionary_engine_unittest.cc
chrome/renderer/spellchecker/spellcheck.cc
chrome/renderer/spellchecker/spellcheck.h
chrome/renderer/spellchecker/spellcheck_unittest.cc