Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / sync / test / integration / dictionary_helper.h
blob9a7b2764df3c36dbad961dfcfd7054cb18d7852e
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.
5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_DICTIONARY_HELPER_H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_DICTIONARY_HELPER_H_
8 #include <string>
10 #include "base/command_line.h"
12 class SpellcheckCustomDictionary;
14 namespace dictionary_helper {
16 // Synchronously loads the dictionaries across all profiles. Also loads the
17 // dictionary for the verifier if DisableVerifier() hasn't been called. Returns
18 // only after the dictionaries have finished to load.
19 void LoadDictionaries();
21 // Used to check the size of the dictionary within a particular sync profile.
22 size_t GetDictionarySize(int index);
24 // Used to check the size of the dictionary within the verifier sync profile.
25 size_t GetVerifierDictionarySize();
27 // Used to verify that dictionaries match across all profiles. Also checks
28 // verifier if DisableVerifier() hasn't been called.
29 bool DictionariesMatch();
31 // Used to verify that the dictionary within a particular sync profile matches
32 // the dictionary within the verifier sync profile.
33 bool DictionaryMatchesVerifier(int index);
35 // Adds |word| to the dictionary for profile with index |index|. Also adds
36 // |word| to the verifier if DisableVerifier() hasn't been called. Returns true
37 // if |word| is valid and not a duplicate. Otherwise returns false.
38 bool AddWord(int index, const std::string& word);
40 // Removes |word| from the dictionary for profile with index |index|. Also
41 // removes |word| from the verifier if DisableVerifier() hasn't been called.
42 // Returns true if |word| was found. Otherwise returns false.
43 bool RemoveWord(int index, const std::string& word);
45 } // namespace dictionary_helper
47 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_DICTIONARY_HELPER_H_