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

Unified Diff: chrome/browser/extensions/api/push_messaging/push_messaging_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
« no previous file with comments | « chrome/browser/extensions/api/push_messaging/push_messaging_api.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/push_messaging/push_messaging_api.cc
diff --git a/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc b/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc
index 56528fa8a31ccda42fe6bd91d61fd43a9746ff10..cab73624538d37285a1216569594a697f5bdc8a1 100644
--- a/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc
+++ b/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc
@@ -281,7 +281,8 @@ void PushMessagingGetChannelIdFunction::OnObfuscatedGaiaIdFetchFailure(
}
}
-PushMessagingAPI::PushMessagingAPI(Profile* profile) : profile_(profile) {
+PushMessagingAPI::PushMessagingAPI(content::BrowserContext* context)
+ : profile_(Profile::FromBrowserContext(context)) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
content::Source<Profile>(profile_->GetOriginalProfile()));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
@@ -294,8 +295,8 @@ PushMessagingAPI::~PushMessagingAPI() {
}
// static
-PushMessagingAPI* PushMessagingAPI::Get(Profile* profile) {
- return ProfileKeyedAPIFactory<PushMessagingAPI>::GetForProfile(profile);
+PushMessagingAPI* PushMessagingAPI::Get(content::BrowserContext* context) {
+ return ProfileKeyedAPIFactory<PushMessagingAPI>::GetForProfile(context);
}
void PushMessagingAPI::Shutdown() {
« no previous file with comments | « chrome/browser/extensions/api/push_messaging/push_messaging_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698