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

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

Issue 11299044: Unittest to go along with added no suggest flag. Currently tests no suggest for English dictionarie… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « DEPS ('k') | chrome/renderer/spellchecker/spellcheck_unittest.cc » ('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 #include "chrome/common/spellcheck_common.h" 5 #include "chrome/common/spellcheck_common.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 8
9 namespace chrome { 9 namespace chrome {
10 namespace spellcheck_common { 10 namespace spellcheck_common {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 {"sr", "-2-0"}, 104 {"sr", "-2-0"},
105 {"uk-UA", "-2-0"}, 105 {"uk-UA", "-2-0"},
106 {"pt-BR", "-2-2"}, // 2-2 (Mar 2011): upgraded a dictionary. 106 {"pt-BR", "-2-2"}, // 2-2 (Mar 2011): upgraded a dictionary.
107 {"sh", "-2-2"}, // 2-2 (Mar 2011): added a dictionary. 107 {"sh", "-2-2"}, // 2-2 (Mar 2011): added a dictionary.
108 {"ca-ES", "-2-3"}, // 2-3 (May 2012): upgraded a dictionary. 108 {"ca-ES", "-2-3"}, // 2-3 (May 2012): upgraded a dictionary.
109 {"sv-SE", "-2-3"}, // 2-3 (May 2012): upgraded a dictionary. 109 {"sv-SE", "-2-3"}, // 2-3 (May 2012): upgraded a dictionary.
110 {"af-ZA", "-2-3"}, // 2-3 (May 2012): added a dictionary. 110 {"af-ZA", "-2-3"}, // 2-3 (May 2012): added a dictionary.
111 {"fo-FO", "-2-3"}, // 2-3 (May 2012): added a dictionary. 111 {"fo-FO", "-2-3"}, // 2-3 (May 2012): added a dictionary.
112 {"en-US", "-2-4"}, // 2-4 (October 2012): add more words. 112 {"en-US", "-2-4"}, // 2-4 (October 2012): add more words.
113 {"en-CA", "-2-4"}, 113 {"en-CA", "-2-4"},
114 {"en-GB", "-2-4"}, 114 {"en-GB", "-2-5"}, // 2-5 (Nov 2012): Added NOSUGGEST flag = !.
115 {"en-AU", "-2-4"}, 115 {"en-AU", "-2-5"}, // Marked 1 word in each.
116 116
117 }; 117 };
118 118
119 // Generate the bdict file name using default version string or special 119 // Generate the bdict file name using default version string or special
120 // version string, depending on the language. 120 // version string, depending on the language.
121 std::string language = GetSpellCheckLanguageRegion(input_language); 121 std::string language = GetSpellCheckLanguageRegion(input_language);
122 std::string versioned_bdict_file_name(language + kDefaultVersionString + 122 std::string versioned_bdict_file_name(language + kDefaultVersionString +
123 ".bdic"); 123 ".bdic");
124 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(special_version_string); ++i) { 124 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(special_version_string); ++i) {
125 if (language == special_version_string[i].language) { 125 if (language == special_version_string[i].language) {
(...skipping 29 matching lines...) Expand all
155 155
156 void SpellCheckLanguages(std::vector<std::string>* languages) { 156 void SpellCheckLanguages(std::vector<std::string>* languages) {
157 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(g_supported_spellchecker_languages); 157 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(g_supported_spellchecker_languages);
158 ++i) { 158 ++i) {
159 languages->push_back(g_supported_spellchecker_languages[i].language); 159 languages->push_back(g_supported_spellchecker_languages[i].language);
160 } 160 }
161 } 161 }
162 162
163 } // namespace spellcheck_common 163 } // namespace spellcheck_common
164 } // namespace chrome 164 } // namespace chrome
OLDNEW
« no previous file with comments | « DEPS ('k') | chrome/renderer/spellchecker/spellcheck_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698