Chromium Code Reviews| 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) { |
|
Yoyo Zhou
2014/02/19 22:44:57
This is for making the transition easier.
James Cook
2014/02/20 17:47:21
I presume at some point this will become GetForBro
Yoyo Zhou
2014/02/20 22:44:54
Sure, we can rename it to Get() later. So the conv
|
| + 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 |