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

Unified Diff: net/base/file_stream.h

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: net/base/file_stream.h
diff --git a/net/base/file_stream.h b/net/base/file_stream.h
index 9fe274759c7fac560acbdc0050b382ac0ac01db1..5fae7c4ff39e3f9372d1c08b2121c760bb9b5613 100644
--- a/net/base/file_stream.h
+++ b/net/base/file_stream.h
@@ -17,6 +17,10 @@
#include "net/base/net_export.h"
#include "net/base/net_log.h"
+#if defined(OS_ANDROID)
+#include "url/gurl.h"
+#endif
+
namespace base {
class FilePath;
}
@@ -81,6 +85,16 @@ class NET_EXPORT FileStream {
// automatically closed when FileStream is destructed.
virtual int OpenSync(const base::FilePath& path, int open_flags);
+#if defined(OS_ANDROID)
+ // Similar to the above open() and OpenSync() call, except that the file
+ // stream is specified by a content URI.
+ virtual int OpenContentUrl(const GURL& content_url, int open_flags,
+ const CompletionCallback& callback);
+ // Similar to the above OpenSync() call, except that the file stream is
+ // specified by a content URI.
+ virtual int OpenContentUrlSync(const GURL& content_url, int open_flags);
+#endif
+
// Returns ERR_IO_PENDING and closes the file asynchronously, calling
// |callback| when done.
// It is invalid to request any asynchronous operations while there is an

Powered by Google App Engine
This is Rietveld 408576698