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

Unified Diff: chrome/browser/extensions/api/media_gallery/media_gallery_api.cc

Issue 10537092: Media Gallery: Register isolated file systems on a per RenderProcessHost basis. Otherwise when one… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | « no previous file | chrome/browser/media_gallery/media_file_system_registry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)) {
« no previous file with comments | « no previous file | chrome/browser/media_gallery/media_file_system_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698