| 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_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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class FilePath; | 14 class FilePath; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace chrome { | |
| 18 namespace spellcheck_common { | 17 namespace spellcheck_common { |
| 19 | 18 |
| 20 // The number of hours that a session of feedback for spelling service lasts. | 19 // The number of hours that a session of feedback for spelling service lasts. |
| 21 // After this number of hours passes, all feedback. | 20 // After this number of hours passes, all feedback. |
| 22 static const int kSessionHours = 6; | 21 static const int kSessionHours = 6; |
| 23 | 22 |
| 24 // The number of context words to keep on either side of a misspelling for | 23 // The number of context words to keep on either side of a misspelling for |
| 25 // spelling service feedback. | 24 // spelling service feedback. |
| 26 static const int kContextWordCount = 2; | 25 static const int kContextWordCount = 2; |
| 27 | 26 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 57 | 56 |
| 58 // Gets the ISO codes for the language and country of this |locale|. The | 57 // Gets the ISO codes for the language and country of this |locale|. The |
| 59 // |locale| is an ISO locale ID that may not include a country ID, e.g., "fr" or | 58 // |locale| is an ISO locale ID that may not include a country ID, e.g., "fr" or |
| 60 // "de". This method converts the UI locale to a full locale ID and converts the | 59 // "de". This method converts the UI locale to a full locale ID and converts the |
| 61 // full locale ID to an ISO language code and an ISO3 country code. | 60 // full locale ID to an ISO language code and an ISO3 country code. |
| 62 void GetISOLanguageCountryCodeFromLocale(const std::string& locale, | 61 void GetISOLanguageCountryCodeFromLocale(const std::string& locale, |
| 63 std::string* language_code, | 62 std::string* language_code, |
| 64 std::string* country_code); | 63 std::string* country_code); |
| 65 | 64 |
| 66 } // namespace spellcheck_common | 65 } // namespace spellcheck_common |
| 67 } // namespace chrome | |
| 68 | 66 |
| 69 #endif // CHROME_COMMON_SPELLCHECK_COMMON_H_ | 67 #endif // CHROME_COMMON_SPELLCHECK_COMMON_H_ |
| OLD | NEW |