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

Unified Diff: chrome/browser/extensions/api/streams_private/streams_private_api.cc

Issue 174513003: Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 3). (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/streams_private/streams_private_api.cc
diff --git a/chrome/browser/extensions/api/streams_private/streams_private_api.cc b/chrome/browser/extensions/api/streams_private/streams_private_api.cc
index 2d69b271de8b29777475330e8d864cdc8d35fd79..a4925e4b390618531665cda1532f7572554091f5 100644
--- a/chrome/browser/extensions/api/streams_private/streams_private_api.cc
+++ b/chrome/browser/extensions/api/streams_private/streams_private_api.cc
@@ -29,15 +29,15 @@ const char kOnExecuteMimeTypeHandler[] =
namespace extensions {
// static
-StreamsPrivateAPI* StreamsPrivateAPI::Get(Profile* profile) {
- return GetFactoryInstance()->GetForProfile(profile);
+StreamsPrivateAPI* StreamsPrivateAPI::Get(content::BrowserContext* context) {
+ return GetFactoryInstance()->GetForProfile(context);
}
-StreamsPrivateAPI::StreamsPrivateAPI(Profile* profile)
- : profile_(profile),
- weak_ptr_factory_(this) {
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- content::Source<Profile>(profile));
+StreamsPrivateAPI::StreamsPrivateAPI(content::BrowserContext* context)
+ : profile_(Profile::FromBrowserContext(context)), weak_ptr_factory_(this) {
+ registrar_.Add(this,
+ chrome::NOTIFICATION_EXTENSION_UNLOADED,
+ content::Source<Profile>(profile_));
}
StreamsPrivateAPI::~StreamsPrivateAPI() {

Powered by Google App Engine
This is Rietveld 408576698