Chromium Code Reviews| Index: chrome/browser/extensions/menu_manager_factory.cc |
| diff --git a/chrome/browser/extensions/menu_manager_factory.cc b/chrome/browser/extensions/menu_manager_factory.cc |
| index c90d888a4f34656e3edfa2bd30569ddebf5970d4..b02f671666dcd0c90563a54cf78816880b9ef02f 100644 |
| --- a/chrome/browser/extensions/menu_manager_factory.cc |
| +++ b/chrome/browser/extensions/menu_manager_factory.cc |
| @@ -25,6 +25,13 @@ MenuManagerFactory* MenuManagerFactory::GetInstance() { |
| return Singleton<MenuManagerFactory>::get(); |
| } |
| +// static |
| +KeyedService* MenuManagerFactory::BuildInstanceFor( |
|
Devlin
2014/07/24 21:51:28
If you're gonna do this, why not just make BuildSe
gpdavis
2014/07/28 21:08:22
BuildServiceInstanceFor is an overridden non-stati
Yoyo Zhou
2014/07/28 23:23:25
We have presubmits that warn about the use of meth
|
| + content::BrowserContext* context) { |
| + Profile* profile = Profile::FromBrowserContext(context); |
| + return new MenuManager(profile, ExtensionSystem::Get(profile)->state_store()); |
| +} |
| + |
| MenuManagerFactory::MenuManagerFactory() |
| : BrowserContextKeyedServiceFactory( |
| "MenuManager", |
| @@ -36,10 +43,7 @@ MenuManagerFactory::~MenuManagerFactory() {} |
| KeyedService* MenuManagerFactory::BuildServiceInstanceFor( |
| content::BrowserContext* context) const { |
| - Profile* profile = Profile::FromBrowserContext(context); |
| - return new MenuManager( |
| - profile, |
| - ExtensionSystem::Get(profile)->state_store()); |
| + return BuildInstanceFor(context); |
| } |
| content::BrowserContext* MenuManagerFactory::GetBrowserContextToUse( |