| Index: chrome/browser/extensions/api/media_gallery/media_gallery_api.cc
|
| ===================================================================
|
| --- chrome/browser/extensions/api/media_gallery/media_gallery_api.cc (revision 141436)
|
| +++ chrome/browser/extensions/api/media_gallery/media_gallery_api.cc (working copy)
|
| @@ -28,11 +28,13 @@
|
| GetMediaFileSystemsFunction::~GetMediaFileSystemsFunction() {}
|
|
|
| bool GetMediaFileSystemsFunction::RunImpl() {
|
| + const content::RenderProcessHost* rph = render_view_host()->GetProcess();
|
| chrome::MediaFileSystemRegistry* media_fs_registry =
|
| MediaFileSystemRegistry::GetInstance();
|
| const std::vector<MediaFileSystemRegistry::MediaFSIDAndPath> filesystems =
|
| - media_fs_registry->GetMediaFileSystems();
|
| + media_fs_registry->GetMediaFileSystems(rph);
|
|
|
| + const int child_id = rph->GetID();
|
| base::ListValue* list = new base::ListValue();
|
| for (size_t i = 0; i < filesystems.size(); i++) {
|
| // TODO(thestig) Check permissions to file systems when that capability
|
| @@ -56,7 +58,6 @@
|
| "dirname", Value::CreateStringValue(basepath_utf8));
|
| list->Append(dict_value);
|
|
|
| - const int child_id = render_view_host()->GetProcess()->GetID();
|
| content::ChildProcessSecurityPolicy* policy =
|
| ChildProcessSecurityPolicy::GetInstance();
|
| if (!policy->CanReadFile(child_id, path)) {
|
|
|