Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_DICTIONARY_HELPER_H_ | |
| 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_DICTIONARY_HELPER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/command_line.h" | |
| 11 | |
| 12 class SpellcheckCustomDictionary; | |
| 13 | |
| 14 namespace dictionary_helper { | |
| 15 | |
| 16 // Enable dictionary sync. | |
| 17 void EnableDictionarySync(CommandLine* cl); | |
| 18 | |
| 19 // Loads the dictionaries across all profiles. Also loads the dictionary for the | |
|
Nicolas Zea
2013/01/17 20:14:52
Synchronously loads
please use gerrit instead
2013/01/17 22:25:29
Done.
| |
| 20 // verifier if DisableVerifier() hasn't been called. Returns only after the | |
| 21 // dictionaries have finished to load. All non-sync changes before the | |
| 22 // dictionaries load will be ignored. | |
| 23 void LoadDictionaries(); | |
| 24 | |
| 25 // Uses to check the size of the dictionary within a particular sync profile. | |
|
Nicolas Zea
2013/01/17 20:14:52
Uses -> Used
please use gerrit instead
2013/01/17 22:25:29
Done.
| |
| 26 size_t GetDictionarySize(int index); | |
| 27 | |
| 28 // Uses to check the size of the dictionary within the verifier sync profile. | |
|
Nicolas Zea
2013/01/17 20:14:52
here too
please use gerrit instead
2013/01/17 22:25:29
Done.
| |
| 29 size_t GetVerifierDictionarySize(); | |
| 30 | |
| 31 // Used to verify that dictionaries match across all profiles. Also checks | |
| 32 // verifier if DisableVerifier() hasn't been called. | |
| 33 bool DictionariesMatch(); | |
| 34 | |
| 35 // Used to verify that the dictionary within a particular sync profile matches | |
| 36 // the dictionary within the verifier sync profile. | |
| 37 bool DictionaryMatchesVerifier(int index); | |
| 38 | |
| 39 // Adds the |word| to the dictionary for profile with index |index|. Also adds | |
|
Nicolas Zea
2013/01/17 20:14:52
Adds |word| (and below)
please use gerrit instead
2013/01/17 22:25:29
Done.
| |
| 40 // the |word| to the verifier if DisableVerifier() hasn't been called. Returns | |
| 41 // true if the word is valid and not a duplicate. Otherwise returns false. | |
| 42 bool AddWord(int index, const std::string& word); | |
| 43 | |
| 44 // Removes the |word| from the dictionary for profile with index |index|. Also | |
| 45 // removes the |word| from the verifier if DisableVerifier() hasn't been called. | |
| 46 // Returns true if the word was found. Otherwise returns false. | |
| 47 bool RemoveWord(int index, const std::string& word); | |
| 48 | |
| 49 } // namespace dictionary_helper | |
| 50 | |
| 51 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_DICTIONARY_HELPER_H_ | |
| OLD | NEW |