summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/spellcheck
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/api/spellcheck')
-rw-r--r--chrome/browser/extensions/api/spellcheck/spellcheck_api.cc5
-rw-r--r--chrome/browser/extensions/api/spellcheck/spellcheck_api.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/extensions/api/spellcheck/spellcheck_api.cc b/chrome/browser/extensions/api/spellcheck/spellcheck_api.cc
index 996624a..7f182f5 100644
--- a/chrome/browser/extensions/api/spellcheck/spellcheck_api.cc
+++ b/chrome/browser/extensions/api/spellcheck/spellcheck_api.cc
@@ -6,6 +6,7 @@
#include "base/lazy_instance.h"
#include "chrome/browser/chrome_notification_types.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/spellchecker/spellcheck_factory.h"
#include "chrome/browser/spellchecker/spellcheck_service.h"
#include "chrome/common/extensions/api/spellcheck/spellcheck_handler.h"
@@ -39,8 +40,8 @@ SpellcheckService::DictionaryFormat GetDictionaryFormat(std::string format) {
} // namespace
-
-SpellcheckAPI::SpellcheckAPI(Profile* profile) {
+SpellcheckAPI::SpellcheckAPI(content::BrowserContext* context) {
+ Profile* profile = Profile::FromBrowserContext(context);
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
diff --git a/chrome/browser/extensions/api/spellcheck/spellcheck_api.h b/chrome/browser/extensions/api/spellcheck/spellcheck_api.h
index f14e669..0d9f5b7 100644
--- a/chrome/browser/extensions/api/spellcheck/spellcheck_api.h
+++ b/chrome/browser/extensions/api/spellcheck/spellcheck_api.h
@@ -16,7 +16,7 @@ namespace extensions {
class SpellcheckAPI : public ProfileKeyedAPI,
public content::NotificationObserver {
public:
- explicit SpellcheckAPI(Profile* profile);
+ explicit SpellcheckAPI(content::BrowserContext* context);
virtual ~SpellcheckAPI();
// ProfileKeyedAPI implementation.