summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/spellcheck
diff options
context:
space:
mode:
authoryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-25 19:24:41 +0000
committeryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-25 19:24:41 +0000
commitc4b717a7763a8509b525ecbcf1d0f03d7eed83b6 (patch)
tree4b5064226e2dbde8a0459dc4cc4989f9c140775a /chrome/browser/extensions/api/spellcheck
parent8548c45dc44afeaeaca0044ec9004aa98a16e754 (diff)
downloadchromium_src-c4b717a7763a8509b525ecbcf1d0f03d7eed83b6.zip
chromium_src-c4b717a7763a8509b525ecbcf1d0f03d7eed83b6.tar.gz
chromium_src-c4b717a7763a8509b525ecbcf1d0f03d7eed83b6.tar.bz2
Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 3).
This is the last part. Follows part 1: https://chromiumcodereview.appspot.com/171813010/ BUG=309909 R=jamescook@chromium.org TBR=brettw@chromium.org, dtseng@chromium.org, erg@chromium.org Review URL: https://codereview.chromium.org/174513003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253223 0039d316-1c4b-4281-b951-d872f2087c98
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.