Index: net/url_request/url_request_file_job.h |
=================================================================== |
--- net/url_request/url_request_file_job.h (revision 145483) |
+++ net/url_request/url_request_file_job.h (working copy) |
@@ -10,6 +10,7 @@ |
#include <vector> |
#include "base/file_path.h" |
+#include "base/memory/weak_ptr.h" |
#include "net/base/file_stream.h" |
#include "net/base/net_export.h" |
#include "net/http/http_byte_range.h" |
@@ -60,22 +61,26 @@ |
const FilePath& path); |
// Callback after fetching file info on a background thread. |
- void DidResolve(bool exists, const base::PlatformFileInfo& file_info); |
+ void DidResolve(const bool* exists, const base::PlatformFileInfo* file_info); |
+ // Callback after opening file on a background thread. |
+ void DidOpen(int result); |
+ |
+ // Callback after seeking to necessary position in the file which is done |
+ // on a background thread. |
+ void DidSeek(int64 result); |
+ |
// Callback after data is asynchronously read from the file. |
void DidRead(int result); |
FileStream stream_; |
bool is_directory_; |
+ int64 file_size_; |
HttpByteRange byte_range_; |
int64 remaining_bytes_; |
- // The initial file metadata is fetched on a background thread. |
- // AsyncResolver runs that task. |
- class AsyncResolver; |
- friend class AsyncResolver; |
- scoped_refptr<AsyncResolver> async_resolver_; |
+ base::WeakPtrFactory<URLRequestFileJob> weak_ptr_factory_; |
DISALLOW_COPY_AND_ASSIGN(URLRequestFileJob); |
}; |