Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(747)

Unified Diff: chrome/browser/extensions/extension_system_factory.cc

Issue 13865012: Change GetProfileToUse method from Profile to content::BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_system_factory.cc
diff --git a/chrome/browser/extensions/extension_system_factory.cc b/chrome/browser/extensions/extension_system_factory.cc
index d91dae4ae1d3f162a4ca161b31e354a1e08ece2f..49f5370aa786eea504027ed78ae4026e653c0526 100644
--- a/chrome/browser/extensions/extension_system_factory.cc
+++ b/chrome/browser/extensions/extension_system_factory.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/policy/profile_policy_connector_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/themes/theme_service_factory.h"
@@ -48,8 +49,9 @@ ProfileKeyedService* ExtensionSystemSharedFactory::BuildServiceInstanceFor(
return new ExtensionSystemImpl::Shared(static_cast<Profile*>(profile));
}
-bool ExtensionSystemSharedFactory::ServiceRedirectedInIncognito() const {
- return true;
+content::BrowserContext* ExtensionSystemSharedFactory::GetBrowserContextToUse(
+ content::BrowserContext* context) const {
+ return chrome::GetBrowserContextRedirectedInIncognito(context);
}
// ExtensionSystemFactory
@@ -80,8 +82,9 @@ ProfileKeyedService* ExtensionSystemFactory::BuildServiceInstanceFor(
return new ExtensionSystemImpl(static_cast<Profile*>(profile));
}
-bool ExtensionSystemFactory::ServiceHasOwnInstanceInIncognito() const {
- return true;
+content::BrowserContext* ExtensionSystemFactory::GetBrowserContextToUse(
+ content::BrowserContext* context) const {
+ return chrome::GetBrowserContextOwnInstanceInIncognito(context);
}
bool ExtensionSystemFactory::ServiceIsCreatedWithProfile() const {
« no previous file with comments | « chrome/browser/extensions/extension_system_factory.h ('k') | chrome/browser/extensions/image_loader_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698