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

Unified Diff: chrome/browser/extensions/api/preference/chrome_direct_setting_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/preference/chrome_direct_setting_api.cc
diff --git a/chrome/browser/extensions/api/preference/chrome_direct_setting_api.cc b/chrome/browser/extensions/api/preference/chrome_direct_setting_api.cc
index 49850f1fa2091df00226c24a5be2976ad61095f5..b153dfdcf1874cc91544080d3ac91febb5c4d11a 100644
--- a/chrome/browser/extensions/api/preference/chrome_direct_setting_api.cc
+++ b/chrome/browser/extensions/api/preference/chrome_direct_setting_api.cc
@@ -75,9 +75,9 @@ base::LazyInstance<PreferenceWhitelist> preference_whitelist =
static base::LazyInstance<ProfileKeyedAPIFactory<ChromeDirectSettingAPI> >
g_factory = LAZY_INSTANCE_INITIALIZER;
-ChromeDirectSettingAPI::ChromeDirectSettingAPI(Profile* profile)
- : profile_(profile) {
- preference_whitelist.Get().RegisterEventListeners(profile, this);
+ChromeDirectSettingAPI::ChromeDirectSettingAPI(content::BrowserContext* context)
+ : profile_(Profile::FromBrowserContext(context)) {
+ preference_whitelist.Get().RegisterEventListeners(profile_, this);
}
ChromeDirectSettingAPI::~ChromeDirectSettingAPI() {}
@@ -108,9 +108,9 @@ bool ChromeDirectSettingAPI::IsPreferenceOnWhitelist(
return preference_whitelist.Get().IsPreferenceOnWhitelist(pref_key);
}
-ChromeDirectSettingAPI* ChromeDirectSettingAPI::Get(Profile* profile) {
- return
- ProfileKeyedAPIFactory<ChromeDirectSettingAPI>::GetForProfile(profile);
+ChromeDirectSettingAPI* ChromeDirectSettingAPI::Get(
+ content::BrowserContext* context) {
+ return ProfileKeyedAPIFactory<ChromeDirectSettingAPI>::GetForProfile(context);
}
// ProfileKeyedAPI implementation.

Powered by Google App Engine
This is Rietveld 408576698