Index: content/browser/renderer_host/file_utilities_message_filter.cc |
diff --git a/content/browser/renderer_host/file_utilities_message_filter.cc b/content/browser/renderer_host/file_utilities_message_filter.cc |
index 65645e014eff6e375ed097fab7c90b424a689935..8fe56bae4a2af8d4914df82a47116732f5648ea7 100644 |
--- a/content/browser/renderer_host/file_utilities_message_filter.cc |
+++ b/content/browser/renderer_host/file_utilities_message_filter.cc |
@@ -8,6 +8,10 @@ |
#include "content/browser/child_process_security_policy_impl.h" |
#include "content/common/file_utilities_messages.h" |
+#if defined(OS_ANDROID) |
+#include "net/android/content_uri_utils.h" |
+#endif |
+ |
namespace content { |
FileUtilitiesMessageFilter::FileUtilitiesMessageFilter(int process_id) |
@@ -48,6 +52,17 @@ void FileUtilitiesMessageFilter::OnGetFileInfo( |
return; |
} |
+#if defined(OS_ANDROID) |
joth
2013/10/31 06:42:39
whats the reason to do this here, and not inside f
qinmin
2013/11/05 01:41:31
Done.
|
+ if (path.IsContentUrl()) { |
+ // TODO(qinmin): Move the logic to content_uri_utils.h and find a way |
+ // to extract information other than size. |
joth
2013/10/31 06:42:39
nit: populate PlatformFileInfo fields other than s
qinmin
2013/11/05 01:41:31
Done.
|
+ int64 size = net::GetContentUrlLengthSync(path); |
+ if (size < 0) |
+ *status = base::PLATFORM_FILE_ERROR_FAILED; |
+ result->size = size; |
+ return; |
+ } |
+#endif |
if (!file_util::GetFileInfo(path, result)) |
*status = base::PLATFORM_FILE_ERROR_FAILED; |
} |