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

Unified Diff: chrome/browser/extensions/api/tab_capture/tab_capture_registry.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/tab_capture/tab_capture_registry.cc
diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc b/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc
index 03420bf24b85ea1a00d588e55e8da448fa6e0ac3..997ccdeebb783921596bba62abb358645f70c6c2 100644
--- a/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc
+++ b/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc
@@ -105,8 +105,8 @@ TabCaptureRequest::TabCaptureRequest(
TabCaptureRequest::~TabCaptureRequest() {
}
-TabCaptureRegistry::TabCaptureRegistry(Profile* profile)
- : profile_(profile) {
+TabCaptureRegistry::TabCaptureRegistry(content::BrowserContext* context)
+ : profile_(Profile::FromBrowserContext(context)) {
MediaCaptureDevicesDispatcher::GetInstance()->AddObserver(this);
registrar_.Add(this,
chrome::NOTIFICATION_EXTENSION_UNLOADED,
@@ -121,8 +121,8 @@ TabCaptureRegistry::~TabCaptureRegistry() {
}
// static
-TabCaptureRegistry* TabCaptureRegistry::Get(Profile* profile) {
- return ProfileKeyedAPIFactory<TabCaptureRegistry>::GetForProfile(profile);
+TabCaptureRegistry* TabCaptureRegistry::Get(content::BrowserContext* context) {
+ return ProfileKeyedAPIFactory<TabCaptureRegistry>::GetForProfile(context);
}
static base::LazyInstance<ProfileKeyedAPIFactory<TabCaptureRegistry> >

Powered by Google App Engine
This is Rietveld 408576698