Chromium Code Reviews| Index: chrome/browser/spellchecker/spellcheck_custom_dictionary.h |
| diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary.h b/chrome/browser/spellchecker/spellcheck_custom_dictionary.h |
| index b1d6045f1db0231c841c7e57c7738cf5b490a0c7..f2035c9f1405e5543aafdfccc3a916491bd6d30e 100644 |
| --- a/chrome/browser/spellchecker/spellcheck_custom_dictionary.h |
| +++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary.h |
| @@ -75,12 +75,31 @@ class SpellcheckCustomDictionary : public SpellcheckDictionary { |
| void SetCustomWordListAndDelete( |
| chrome::spellcheck_common::WordList* custom_words); |
| + // Loads the dictionary file into |contents|. If the dictionary checksum is |
| + // not valid, but backup checksum is valid, then restores the backup and loads |
| + // that into |contents| instead. |
| + void LoadDictionaryContentsReliably(std::string* contents); |
| + |
| + // Backs up the original dictionary and checksum files, saves |contents| into |
| + // the dictionary file, and saves the checksum of |contents| into the checksum |
| + // file. |
| + void SaveDictionryContentsReliably(const std::string& contents); |
| + |
| // In-memory cache of the custom words file. |
| chrome::spellcheck_common::WordList words_; |
| // A path for custom dictionary per profile. |
| FilePath custom_dictionary_path_; |
| + // A path for checksum of custom dictionary per profile. |
| + FilePath custom_dictionary_checksum_path_; |
| + |
|
groby-ooo-7-16
2012/12/03 17:12:44
Can't we just derive all those filepaths computati
please use gerrit instead
2012/12/03 23:16:51
Done.
|
| + // A path for custom dictionary backup per profile. |
| + FilePath custom_dictionary_backup_path_; |
| + |
| + // A path for checksum of custom dictionary backup per profile. |
| + FilePath custom_dictionary_checksum_backup_path_; |
| + |
| base::WeakPtrFactory<SpellcheckCustomDictionary> weak_ptr_factory_; |
| std::vector<Observer*> observers_; |