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

Side by Side Diff: chrome/common/spellcheck_common.h

Issue 11445002: Sync user's custom spellcheck dictionary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge master Created 7 years, 11 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 unified diff | Download patch
« no previous file with comments | « chrome/common/pref_names.cc ('k') | chrome/common/spellcheck_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_COMMON_SPELLCHECK_COMMON_H_ 5 #ifndef CHROME_COMMON_SPELLCHECK_COMMON_H_
6 #define CHROME_COMMON_SPELLCHECK_COMMON_H_ 6 #define CHROME_COMMON_SPELLCHECK_COMMON_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 class FilePath; 11 class FilePath;
12 12
13 namespace chrome { 13 namespace chrome {
14 namespace spellcheck_common { 14 namespace spellcheck_common {
15 15
16 // Max number of dictionary suggestions. 16 // Max number of dictionary suggestions.
17 static const int kMaxSuggestions = 5; 17 static const int kMaxSuggestions = 5;
18 18
19 static const int kMaxAutoCorrectWordSize = 8; 19 static const int kMaxAutoCorrectWordSize = 8;
20 20
21 // Maximum number of words in the custom spellcheck dictionary that can be
22 // synced.
23 static const size_t MAX_SYNCABLE_DICTIONARY_WORDS = 1300;
24
25 // Maximum number of bytes in a word that can be added to the custom spellcheck
26 // dictionary.
27 static const size_t MAX_CUSTOM_DICTIONARY_WORD_BYTES = 99;
28
21 typedef std::vector<std::string> WordList; 29 typedef std::vector<std::string> WordList;
22 30
23 FilePath GetVersionedFileName(const std::string& input_language, 31 FilePath GetVersionedFileName(const std::string& input_language,
24 const FilePath& dict_dir); 32 const FilePath& dict_dir);
25 33
26 std::string GetCorrespondingSpellCheckLanguage(const std::string& language); 34 std::string GetCorrespondingSpellCheckLanguage(const std::string& language);
27 35
28 // Get SpellChecker supported languages. 36 // Get SpellChecker supported languages.
29 void SpellCheckLanguages(std::vector<std::string>* languages); 37 void SpellCheckLanguages(std::vector<std::string>* languages);
30 38
31 } // namespace spellcheck_common 39 } // namespace spellcheck_common
32 } // namespace chrome 40 } // namespace chrome
33 41
34 #endif // CHROME_COMMON_SPELLCHECK_COMMON_H_ 42 #endif // CHROME_COMMON_SPELLCHECK_COMMON_H_
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | chrome/common/spellcheck_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698