Index: chrome/browser/extensions/api/hotword_private/hotword_private_api.cc |
diff --git a/chrome/browser/extensions/api/hotword_private/hotword_private_api.cc b/chrome/browser/extensions/api/hotword_private/hotword_private_api.cc |
index 6aa9bdf706fdc30aec3d26f701c88238f6998dfe..b2d43747dbf76bceb7eff2b31bba5e1909e738f0 100644 |
--- a/chrome/browser/extensions/api/hotword_private/hotword_private_api.cc |
+++ b/chrome/browser/extensions/api/hotword_private/hotword_private_api.cc |
@@ -22,9 +22,10 @@ static base::LazyInstance< |
ProfileKeyedAPIFactory<HotwordPrivateEventService> > g_factory = |
LAZY_INSTANCE_INITIALIZER; |
-HotwordPrivateEventService::HotwordPrivateEventService(Profile* profile) |
- : profile_(profile) { |
- pref_change_registrar_.Init(profile->GetPrefs()); |
+HotwordPrivateEventService::HotwordPrivateEventService( |
+ content::BrowserContext* context) |
+ : profile_(Profile::FromBrowserContext(context)) { |
+ pref_change_registrar_.Init(profile_->GetPrefs()); |
pref_change_registrar_.Add( |
prefs::kHotwordSearchEnabled, |
base::Bind(&HotwordPrivateEventService::OnEnabledChanged, |