| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_DICTIONARY_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_DICTIONARY_HELPER_H_ |
| 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_DICTIONARY_HELPER_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_DICTIONARY_HELPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 | 11 |
| 12 class SpellcheckCustomDictionary; | 12 class SpellcheckCustomDictionary; |
| 13 | 13 |
| 14 namespace dictionary_helper { | 14 namespace dictionary_helper { |
| 15 | 15 |
| 16 // Enable dictionary sync. | |
| 17 void EnableDictionarySync(CommandLine* cl); | |
| 18 | |
| 19 // Synchronously loads the dictionaries across all profiles. Also loads the | 16 // Synchronously loads the dictionaries across all profiles. Also loads the |
| 20 // dictionary for the verifier if DisableVerifier() hasn't been called. Returns | 17 // dictionary for the verifier if DisableVerifier() hasn't been called. Returns |
| 21 // only after the dictionaries have finished to load. | 18 // only after the dictionaries have finished to load. |
| 22 void LoadDictionaries(); | 19 void LoadDictionaries(); |
| 23 | 20 |
| 24 // Used to check the size of the dictionary within a particular sync profile. | 21 // Used to check the size of the dictionary within a particular sync profile. |
| 25 size_t GetDictionarySize(int index); | 22 size_t GetDictionarySize(int index); |
| 26 | 23 |
| 27 // Used to check the size of the dictionary within the verifier sync profile. | 24 // Used to check the size of the dictionary within the verifier sync profile. |
| 28 size_t GetVerifierDictionarySize(); | 25 size_t GetVerifierDictionarySize(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 41 bool AddWord(int index, const std::string& word); | 38 bool AddWord(int index, const std::string& word); |
| 42 | 39 |
| 43 // Removes |word| from the dictionary for profile with index |index|. Also | 40 // Removes |word| from the dictionary for profile with index |index|. Also |
| 44 // removes |word| from the verifier if DisableVerifier() hasn't been called. | 41 // removes |word| from the verifier if DisableVerifier() hasn't been called. |
| 45 // Returns true if |word| was found. Otherwise returns false. | 42 // Returns true if |word| was found. Otherwise returns false. |
| 46 bool RemoveWord(int index, const std::string& word); | 43 bool RemoveWord(int index, const std::string& word); |
| 47 | 44 |
| 48 } // namespace dictionary_helper | 45 } // namespace dictionary_helper |
| 49 | 46 |
| 50 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_DICTIONARY_HELPER_H_ | 47 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_DICTIONARY_HELPER_H_ |
| OLD | NEW |