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

Unified Diff: chrome/browser/extensions/api/hotword_private/hotword_private_api.cc

Issue 166053003: Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 2). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: | 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
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,

Powered by Google App Engine
This is Rietveld 408576698