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

Unified Diff: chrome/browser/extensions/api/profile_keyed_api_factory.h

Issue 171813010: Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 1). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: browser_context_ Created 6 years, 10 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
« no previous file with comments | « chrome/browser/extensions/api/feedback_private/feedback_private_api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7a5f3ab4b5b1c55a1a743dfe41d7b2151d0c9b4b..83f0d8c9a59590876e5441a0b55d6e2e3524a22f 100644
--- a/chrome/browser/extensions/api/profile_keyed_api_factory.h
+++ b/chrome/browser/extensions/api/profile_keyed_api_factory.h
@@ -61,11 +61,17 @@ class ProfileKeyedAPI : public BrowserContextKeyedService {
template <typename T>
class ProfileKeyedAPIFactory : public BrowserContextKeyedServiceFactory {
public:
+ // TODO(yoz): Delete this one.
static T* GetForProfile(Profile* profile) {
return static_cast<T*>(
T::GetFactoryInstance()->GetServiceForBrowserContext(profile, true));
}
+ static T* GetForProfile(content::BrowserContext* context) {
+ return static_cast<T*>(T::GetFactoryInstance()->GetServiceForBrowserContext(
+ Profile::FromBrowserContext(context), true));
+ }
+
// Declare dependencies on other factories.
// By default, ExtensionSystemFactory is the only dependency; however,
// specializations can override this. Declare your specialization in
« no previous file with comments | « chrome/browser/extensions/api/feedback_private/feedback_private_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698