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

Unified Diff: content/worker/worker_webkitplatformsupport_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/worker/worker_webkitplatformsupport_impl.cc
diff --git a/content/worker/worker_webkitplatformsupport_impl.cc b/content/worker/worker_webkitplatformsupport_impl.cc
index f3dee3650a51d4307d7b5ae074ac99117f715440..7816243af65c6e752fc7006c09dd23399c37ab82 100644
--- a/content/worker/worker_webkitplatformsupport_impl.cc
+++ b/content/worker/worker_webkitplatformsupport_impl.cc
@@ -62,12 +62,26 @@ bool WorkerWebKitPlatformSupportImpl::FileUtilities::getFileInfo(
WebFileInfo& web_file_info) {
base::PlatformFileInfo file_info;
base::PlatformFileError status;
+#if defined(OS_ANDROID)
+ GURL url(path.utf8());
+ if (url.SchemeIsContent()) {
+ if (!thread_safe_sender_.get() ||
+ !thread_safe_sender_->Send(new FileUtilitiesMsg_GetContentUrlInfo(
+ url, &file_info, &status)) ||
+ status != base::PLATFORM_FILE_OK) {
+ return false;
+ }
+ } else {
+#endif
if (!thread_safe_sender_.get() ||
!thread_safe_sender_->Send(new FileUtilitiesMsg_GetFileInfo(
base::FilePath::FromUTF16Unsafe(path), &file_info, &status)) ||
status != base::PLATFORM_FILE_OK) {
return false;
}
+#if defined(OS_ANDROID)
+ }
+#endif
webkit_glue::PlatformFileInfoToWebFileInfo(file_info, &web_file_info);
web_file_info.platformPath = path;
return true;

Powered by Google App Engine
This is Rietveld 408576698