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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 46303005: Fix chrome upload with content uri (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 8018d57b197574486dc6e2f9e61efd156257650c..fbb8334ecf408ef89b06909518cadb0803d98501 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -1095,8 +1095,18 @@ void RenderViewHostImpl::FilesSelectedInChooser(
ChildProcessSecurityPolicyImpl::GetInstance()->GrantCreateReadWriteFile(
GetProcess()->GetID(), file.local_path);
} else {
+#if defined(OS_ANDROID)
+ GURL url(file.local_path.value());
+ if (url.SchemeIsContent()) {
+ ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadContentUrl(
+ GetProcess()->GetID(), url);
kinuko 2013/10/29 02:52:31 We receive this as file path and then at some poin
qinmin 2013/10/29 19:14:21 For upload case, the content url should point to a
+ } else {
+#endif
ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile(
GetProcess()->GetID(), file.local_path);
+#if defined(OS_ANDROID)
+ }
+#endif
}
}
Send(new ViewMsg_RunFileChooserResponse(GetRoutingID(), files));

Powered by Google App Engine
This is Rietveld 408576698