Index: ppapi/native_client/src/trusted/plugin/file_downloader.h |
diff --git a/ppapi/native_client/src/trusted/plugin/file_downloader.h b/ppapi/native_client/src/trusted/plugin/file_downloader.h |
index a60c837ef80f28783d5f9c378188d95f3a9e93e6..e4e7ca4a8f675510f363a1e2aa3cf26dca229013 100644 |
--- a/ppapi/native_client/src/trusted/plugin/file_downloader.h |
+++ b/ppapi/native_client/src/trusted/plugin/file_downloader.h |
@@ -10,6 +10,7 @@ |
#include "native_client/src/include/nacl_macros.h" |
#include "native_client/src/include/nacl_string.h" |
#include "native_client/src/trusted/plugin/callback_source.h" |
+#include "native_client/src/trusted/reverse_service/nacl_file_info.h" |
#include "ppapi/c/private/pp_file_handle.h" |
#include "ppapi/c/trusted/ppb_file_io_trusted.h" |
#include "ppapi/c/trusted/ppb_url_loader_trusted.h" |
@@ -85,14 +86,16 @@ class FileDownloader { |
StreamCallbackSource* stream_callback_source); |
// Bypasses downloading and takes a handle to the open file. To get the fd, |
- // call GetPOSIXFileDescriptor(). |
- void OpenFast(const nacl::string& url, PP_FileHandle file_handle); |
+ // call GetFileInfo(). |
+ void OpenFast(const nacl::string& url, PP_FileHandle file_handle, |
+ uint64_t nonce); |
+ // Return a structure describing the file opened, including a file desc. |
// If downloading and opening succeeded, this returns a valid read-only |
// POSIX file descriptor. On failure, the return value is an invalid |
// descriptor. The file descriptor is owned by this instance, so the |
// delegate does not have to close it. |
- int32_t GetPOSIXFileDescriptor(); |
+ struct NaClFileInfo GetFileInfo(); |
// Returns the time delta between the call to Open() and this function. |
int64_t TimeSinceOpenMilliseconds() const; |
@@ -160,6 +163,7 @@ class FileDownloader { |
pp::CompletionCallback file_open_notify_callback_; |
pp::FileIO file_reader_; |
PP_FileHandle file_handle_; |
+ uint64_t nonce_; |
const PPB_FileIOTrusted* file_io_trusted_interface_; |
const PPB_URLLoaderTrusted* url_loader_trusted_interface_; |
pp::URLLoader url_loader_; |