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

Unified Diff: chrome/browser/spellchecker/spellcheck_profile.h

Issue 8345034: SpellCheck: the custom dictionary should be per profile. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/spellchecker/spellcheck_profile.h
diff --git a/chrome/browser/spellchecker/spellcheck_profile.h b/chrome/browser/spellchecker/spellcheck_profile.h
index 7a7bf0d511aca8cd8ba34b7f3e735de0823670ef..d827c4966075157ca04db4b8e232471f9c8bcfe6 100644
--- a/chrome/browser/spellchecker/spellcheck_profile.h
+++ b/chrome/browser/spellchecker/spellcheck_profile.h
@@ -9,6 +9,7 @@
#include <string>
#include <vector>
+#include "base/file_path.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/ref_counted.h"
#include "chrome/browser/spellchecker/spellcheck_profile_provider.h"
@@ -56,7 +57,7 @@ class SpellCheckProfile : public SpellCheckProfileProvider {
REINITIALIZE_DID_NOTHING
};
- SpellCheckProfile();
+ explicit SpellCheckProfile(const FilePath& profile_dir);
virtual ~SpellCheckProfile();
// Retrieves SpellCheckHost object.
@@ -86,6 +87,10 @@ class SpellCheckProfile : public SpellCheckProfileProvider {
virtual const CustomWordList& GetCustomWords() const;
virtual void CustomWordAddedLocally(const std::string& word);
+ // Methods about custom dictionary.
+ virtual void LoadCustomDictionary(CustomWordList* custom_words);
+ virtual void WriteWordToCustomDictionary(const std::string& word);
+
protected:
// Only tests should override this.
virtual SpellCheckHost* CreateHost(
@@ -107,6 +112,9 @@ class SpellCheckProfile : public SpellCheckProfileProvider {
// In-memory cache of the custom words file.
scoped_ptr<CustomWordList> custom_words_;
+ // A path for custom dictionary per profile.
+ FilePath custom_dictionary_path_;
+
DISALLOW_COPY_AND_ASSIGN(SpellCheckProfile);
};

Powered by Google App Engine
This is Rietveld 408576698