| Index: chrome/browser/extensions/api/commands/command_service.cc
|
| diff --git a/chrome/browser/extensions/api/commands/command_service.cc b/chrome/browser/extensions/api/commands/command_service.cc
|
| index 70b29f8c0e17e76f9bf9107687ab48c488b245cd..1968809350429a1cc38eb0ecf1dc1833ff8e8970 100644
|
| --- a/chrome/browser/extensions/api/commands/command_service.cc
|
| +++ b/chrome/browser/extensions/api/commands/command_service.cc
|
| @@ -149,15 +149,17 @@ void CommandService::RegisterProfilePrefs(
|
| user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
| }
|
|
|
| -CommandService::CommandService(Profile* profile)
|
| - : profile_(profile) {
|
| +CommandService::CommandService(content::BrowserContext* context)
|
| + : profile_(Profile::FromBrowserContext(context)) {
|
| ExtensionFunctionRegistry::GetInstance()->
|
| RegisterFunction<GetAllCommandsFunction>();
|
|
|
| - registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
|
| - content::Source<Profile>(profile));
|
| - registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
|
| - content::Source<Profile>(profile));
|
| + registrar_.Add(this,
|
| + chrome::NOTIFICATION_EXTENSION_INSTALLED,
|
| + content::Source<Profile>(profile_));
|
| + registrar_.Add(this,
|
| + chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
|
| + content::Source<Profile>(profile_));
|
| }
|
|
|
| CommandService::~CommandService() {
|
| @@ -172,8 +174,8 @@ ProfileKeyedAPIFactory<CommandService>* CommandService::GetFactoryInstance() {
|
| }
|
|
|
| // static
|
| -CommandService* CommandService::Get(Profile* profile) {
|
| - return ProfileKeyedAPIFactory<CommandService>::GetForProfile(profile);
|
| +CommandService* CommandService::Get(content::BrowserContext* context) {
|
| + return ProfileKeyedAPIFactory<CommandService>::GetForProfile(context);
|
| }
|
|
|
| // static
|
|
|