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

Unified Diff: net/base/file_stream_context.cc

Issue 46303005: Fix chrome upload with content uri (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simplify the change using FILE enum instead of adding a new enum 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: net/base/file_stream_context.cc
diff --git a/net/base/file_stream_context.cc b/net/base/file_stream_context.cc
index 2e774752045d9c0d0e6a8c82dc3dfc7a6bb9c366..cc388d1cbce728e5669f2d441d9d1e2f994151a2 100644
--- a/net/base/file_stream_context.cc
+++ b/net/base/file_stream_context.cc
@@ -64,6 +64,12 @@ void FileStream::Context::Orphan() {
void FileStream::Context::OpenAsync(const base::FilePath& path,
int open_flags,
const CompletionCallback& callback) {
+#if defined(OS_ANDROID)
+ if (path.IsContentUrl()) {
+ OpenContentUrlAsync(path, open_flags, callback);
+ return;
+ }
+#endif
DCHECK(!async_in_progress_);
BeginOpenEvent(path);
@@ -80,6 +86,10 @@ void FileStream::Context::OpenAsync(const base::FilePath& path,
}
int FileStream::Context::OpenSync(const base::FilePath& path, int open_flags) {
+#if defined(OS_ANDROID)
+ if (path.IsContentUrl())
+ return OpenContentUrlSync(path, open_flags);
+#endif
DCHECK(!async_in_progress_);
BeginOpenEvent(path);

Powered by Google App Engine
This is Rietveld 408576698