summaryrefslogtreecommitdiffstats
path: root/chrome/browser/spellchecker/spellcheck_factory.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-03 23:18:34 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-03 23:18:34 +0000
commit018bf658250915fd117e75b81e27a321f081ef8c (patch)
treeb7217ea06f10ba62e78414161ad099082124e3e9 /chrome/browser/spellchecker/spellcheck_factory.cc
parent843e2e8a17bf20d8af604ed7d217ff1d28b88937 (diff)
downloadchromium_src-018bf658250915fd117e75b81e27a321f081ef8c.zip
chromium_src-018bf658250915fd117e75b81e27a321f081ef8c.tar.gz
chromium_src-018bf658250915fd117e75b81e27a321f081ef8c.tar.bz2
Change GetProfileToUse method from Profile to content::BrowserContext
This drops a dependency on Profile in the interface of ProfileKeyedService infrastructure, and adds helper functions that make it explicit what is being done (it's not obvious just from "return context" for example that this will result in the service having its own instance in Incognito mode instead of no instance). BUG=227219 R=erg@chromium.org, joi@chromium.org Review URL: https://codereview.chromium.org/13865012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198232 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/spellchecker/spellcheck_factory.cc')
-rw-r--r--chrome/browser/spellchecker/spellcheck_factory.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc
index 40bea53..87dabaf 100644
--- a/chrome/browser/spellchecker/spellcheck_factory.cc
+++ b/chrome/browser/spellchecker/spellcheck_factory.cc
@@ -6,6 +6,7 @@
#include "base/prefs/pref_service.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
#include "chrome/browser/spellchecker/spellcheck_service.h"
@@ -90,8 +91,9 @@ void SpellcheckServiceFactory::RegisterUserPrefs(
PrefRegistrySyncable::SYNCABLE_PREF);
}
-bool SpellcheckServiceFactory::ServiceRedirectedInIncognito() const {
- return true;
+content::BrowserContext* SpellcheckServiceFactory::GetBrowserContextToUse(
+ content::BrowserContext* context) const {
+ return chrome::GetBrowserContextRedirectedInIncognito(context);
}
bool SpellcheckServiceFactory::ServiceIsNULLWhileTesting() const {