diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-25 20:44:08 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-25 20:44:08 +0000 |
commit | bd17b70920f5a327eada613ef32e501b043cad51 (patch) | |
tree | 7d6deb4e24373ceb2ea9affb9fdd9dab5a1f6482 /chrome/browser/spellchecker.h | |
parent | a12f3755769dea04a41785657c37dc90b443caaf (diff) | |
download | chromium_src-bd17b70920f5a327eada613ef32e501b043cad51.zip chromium_src-bd17b70920f5a327eada613ef32e501b043cad51.tar.gz chromium_src-bd17b70920f5a327eada613ef32e501b043cad51.tar.bz2 |
Ports SpellChecker to use FilePaths instead of wstring.
by Rohit Rao (rohitrao@google.com)
issue: http://codereview.chromium.org/28013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10374 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/spellchecker.h')
-rw-r--r-- | chrome/browser/spellchecker.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/chrome/browser/spellchecker.h b/chrome/browser/spellchecker.h index 42279c2..ede737a 100644 --- a/chrome/browser/spellchecker.h +++ b/chrome/browser/spellchecker.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_SPELLCHECKER_H__ -#define CHROME_BROWSER_SPELLCHECKER_H__ +#ifndef CHROME_BROWSER_SPELLCHECKER_H_ +#define CHROME_BROWSER_SPELLCHECKER_H_ #include <vector> @@ -18,6 +18,7 @@ #include "base/task.h" #include "unicode/uscript.h" +class FilePath; class Hunspell; class PrefService; class Profile; @@ -51,10 +52,10 @@ class SpellChecker : public base::RefCountedThreadSafe<SpellChecker> { // The |custom_dictionary_file_name| should be left blank so that Spellchecker // can figure out the custom dictionary file. It is non empty only for unit // testing. - SpellChecker(const std::wstring& dict_dir, + SpellChecker(const FilePath& dict_dir, const Language& language, URLRequestContext* request_context, - const std::wstring& custom_dictionary_file_name); + const FilePath& custom_dictionary_file_name); // Only delete on the I/O thread (see above). ~SpellChecker(); @@ -81,13 +82,13 @@ class SpellChecker : public base::RefCountedThreadSafe<SpellChecker> { // Get SpellChecker supported languages. static void SpellCheckLanguages(Languages* languages); - // This function computes a vector of strings which are to be displayed in + // This function computes a vector of strings which are to be displayed in // the context menu over a text area for changing spell check languages. It // returns the index of the current spell check language in the vector. static int GetSpellCheckLanguagesToDisplayInContextMenu( Profile* profile, Languages* display_languages); - + // This function returns the corresponding language-region code for the // spell check language. For example, for hi, it returns hi-IN. static Language GetSpellCheckLanguageRegion(Language input_language); @@ -111,7 +112,7 @@ class SpellChecker : public base::RefCountedThreadSafe<SpellChecker> { void set_file_is_downloading(bool value); // Memory maps the given .bdic file. On success, it will return true and will - // place the data and lenght into the given out parameters. + // place the data and length into the given out parameters. bool MapBdictFile(const unsigned char** data, size_t* length); // Returns whether or not the given word is a contraction of valid words @@ -120,16 +121,16 @@ class SpellChecker : public base::RefCountedThreadSafe<SpellChecker> { // Return the file name of the dictionary, including the path and the version // numbers. - std::wstring GetVersionedFileName(const Language& language, - const std::wstring& dict_dir); + FilePath GetVersionedFileName(const Language& language, + const FilePath& dict_dir); static Language GetCorrespondingSpellCheckLanguage(const Language& language); - + // Path to the spellchecker file. - std::wstring bdict_file_name_; + FilePath bdict_file_name_; // Path to the custom dictionary file. - std::wstring custom_dictionary_file_name_; + FilePath custom_dictionary_file_name_; // We memory-map the BDict file. scoped_ptr<file_util::MemoryMappedFile> bdict_file_; @@ -182,5 +183,4 @@ class SpellChecker : public base::RefCountedThreadSafe<SpellChecker> { DISALLOW_COPY_AND_ASSIGN(SpellChecker); }; -#endif // #ifndef CHROME_BROWSER_SPELLCHECKER_H__ - +#endif // #ifndef CHROME_BROWSER_SPELLCHECKER_H_ |