| Index: chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
|
| diff --git a/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc b/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
|
| index fed85fb911399e934dbd6e0f42ba3433a31c895c..44a531aae1f6fd1a965287cc2a98fd4398c82215 100644
|
| --- a/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
|
| +++ b/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
|
| @@ -255,9 +255,9 @@ class SelectDirectoryDialog : public ui::SelectFileDialog::Listener,
|
|
|
| } // namespace
|
|
|
| -MediaGalleriesEventRouter::MediaGalleriesEventRouter(Profile* profile)
|
| - : profile_(profile),
|
| - weak_ptr_factory_(this) {
|
| +MediaGalleriesEventRouter::MediaGalleriesEventRouter(
|
| + content::BrowserContext* context)
|
| + : profile_(Profile::FromBrowserContext(context)), weak_ptr_factory_(this) {
|
| DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
|
| DCHECK(profile_);
|
| media_scan_manager()->AddObserver(profile_, this);
|
| @@ -283,11 +283,13 @@ MediaGalleriesEventRouter::GetFactoryInstance() {
|
| }
|
|
|
| // static
|
| -MediaGalleriesEventRouter* MediaGalleriesEventRouter::Get(Profile* profile) {
|
| - DCHECK(media_file_system_registry()->GetPreferences(profile)->
|
| - IsInitialized());
|
| +MediaGalleriesEventRouter* MediaGalleriesEventRouter::Get(
|
| + content::BrowserContext* context) {
|
| + DCHECK(media_file_system_registry()
|
| + ->GetPreferences(Profile::FromBrowserContext(context))
|
| + ->IsInitialized());
|
| return ProfileKeyedAPIFactory<MediaGalleriesEventRouter>::GetForProfile(
|
| - profile);
|
| + context);
|
| }
|
|
|
| bool MediaGalleriesEventRouter::ExtensionHasScanProgressListener(
|
|
|