summaryrefslogtreecommitdiffstats
path: root/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
diff options
context:
space:
mode:
authorwxjg68@motorola.com <wxjg68@motorola.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-29 04:03:20 +0000
committerwxjg68@motorola.com <wxjg68@motorola.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-29 04:03:20 +0000
commitba23e67a80f782d126f59f1a33555c16f7843605 (patch)
treef97410c559dab9a77be97ea6d0dc53e934f6745b /chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
parent878797f9a9fc531587ecf1fcdcdc44fcc284bce1 (diff)
downloadchromium_src-ba23e67a80f782d126f59f1a33555c16f7843605.zip
chromium_src-ba23e67a80f782d126f59f1a33555c16f7843605.tar.gz
chromium_src-ba23e67a80f782d126f59f1a33555c16f7843605.tar.bz2
Introduced a Delegate to De-couple SpellcheckDictionary from C/B/profile
An independent sub patch of https://codereview.chromium.org/11889021/ to incorporate Spellchecker as a browser component BUG=none Review URL: https://chromiumcodereview.appspot.com/12036044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179289 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/spellchecker/spellcheck_custom_dictionary.cc')
-rw-r--r--chrome/browser/spellchecker/spellcheck_custom_dictionary.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
index aa56a88..4636ed6 100644
--- a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
+++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
@@ -11,7 +11,6 @@
#include "base/md5.h"
#include "base/string_number_conversions.h"
#include "base/string_split.h"
-#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/spellcheck_messages.h"
#include "content/public/browser/browser_thread.h"
@@ -217,14 +216,12 @@ bool SpellcheckCustomDictionary::Change::empty() const {
return to_add_.empty() && to_remove_.empty();
}
-SpellcheckCustomDictionary::SpellcheckCustomDictionary(Profile* profile)
- : SpellcheckDictionary(profile),
- custom_dictionary_path_(),
+SpellcheckCustomDictionary::SpellcheckCustomDictionary(const FilePath& path)
+ : custom_dictionary_path_(),
weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
is_loaded_(false) {
- DCHECK(profile);
custom_dictionary_path_ =
- profile_->GetPath().Append(chrome::kCustomDictionaryFileName);
+ path.Append(chrome::kCustomDictionaryFileName);
}
SpellcheckCustomDictionary::~SpellcheckCustomDictionary() {