| Index: chrome/browser/extensions/api/profile_keyed_api_factory.h
|
| diff --git a/chrome/browser/extensions/api/profile_keyed_api_factory.h b/chrome/browser/extensions/api/profile_keyed_api_factory.h
|
| index bddeea43624fbf9d31ddf68dc31725e59dc1f580..4cea7834cddc47a451a0d38da3eb6350ccc47677 100644
|
| --- a/chrome/browser/extensions/api/profile_keyed_api_factory.h
|
| +++ b/chrome/browser/extensions/api/profile_keyed_api_factory.h
|
| @@ -6,6 +6,7 @@
|
| #define CHROME_BROWSER_EXTENSIONS_API_PROFILE_KEYED_API_FACTORY_H_
|
|
|
| #include "chrome/browser/extensions/extension_system_factory.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/profiles/profile_keyed_service.h"
|
| @@ -93,8 +94,12 @@ class ProfileKeyedAPIFactory : public ProfileKeyedServiceFactory {
|
|
|
| // ProfileKeyedBaseFactory implementation.
|
| // These can be effectively overridden with template specializations.
|
| - virtual bool ServiceRedirectedInIncognito() const OVERRIDE {
|
| - return T::kServiceRedirectedInIncognito;
|
| + virtual content::BrowserContext* GetBrowserContextToUse(
|
| + content::BrowserContext* context) const OVERRIDE {
|
| + if (T::kServiceRedirectedInIncognito)
|
| + return chrome::GetBrowserContextRedirectedInIncognito(context);
|
| +
|
| + return ProfileKeyedServiceFactory::GetBrowserContextToUse(context);
|
| }
|
|
|
| virtual bool ServiceIsCreatedWithProfile() const OVERRIDE {
|
|
|