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

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: Update. 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..f06cb3e07f58e36fc6b6cd87bd92588e059a9140 100644
--- a/chrome/browser/spellchecker/spellcheck_profile.h
+++ b/chrome/browser/spellchecker/spellcheck_profile.h
@@ -9,6 +9,8 @@
#include <string>
#include <vector>
+#include "base/compiler_specific.h"
+#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 +58,7 @@ class SpellCheckProfile : public SpellCheckProfileProvider {
REINITIALIZE_DID_NOTHING
};
- SpellCheckProfile();
+ explicit SpellCheckProfile(const FilePath& profile_dir);
virtual ~SpellCheckProfile();
// Retrieves SpellCheckHost object.
@@ -82,9 +84,11 @@ class SpellCheckProfile : public SpellCheckProfileProvider {
void StartRecordingMetrics(bool spellcheck_enabled);
// SpellCheckProfileProvider implementation.
- virtual void SpellCheckHostInitialized(CustomWordList* custom_words);
- virtual const CustomWordList& GetCustomWords() const;
- virtual void CustomWordAddedLocally(const std::string& word);
+ virtual void SpellCheckHostInitialized(CustomWordList* custom_words) OVERRIDE;
+ virtual const CustomWordList& GetCustomWords() const OVERRIDE;
+ virtual void CustomWordAddedLocally(const std::string& word) OVERRIDE;
+ virtual void LoadCustomDictionary(CustomWordList* custom_words) OVERRIDE;
+ virtual void WriteWordToCustomDictionary(const std::string& word) OVERRIDE;
protected:
// Only tests should override this.
@@ -97,6 +101,8 @@ class SpellCheckProfile : public SpellCheckProfileProvider {
virtual bool IsTesting() const;
private:
+ const FilePath& GetCustomDictionaryPath();
+
scoped_refptr<SpellCheckHost> host_;
scoped_ptr<SpellCheckHostMetrics> metrics_;
@@ -107,6 +113,12 @@ class SpellCheckProfile : public SpellCheckProfileProvider {
// In-memory cache of the custom words file.
scoped_ptr<CustomWordList> custom_words_;
+ // A directory path of profile.
+ FilePath profile_dir_;
+
+ // A path for custom dictionary per profile.
+ scoped_ptr<FilePath> custom_dictionary_path_;
+
DISALLOW_COPY_AND_ASSIGN(SpellCheckProfile);
};
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_host_impl.cc ('k') | chrome/browser/spellchecker/spellcheck_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698