diff options
author | kerz@chromium.org <kerz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-20 22:19:17 +0000 |
---|---|---|
committer | kerz@chromium.org <kerz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-20 22:19:17 +0000 |
commit | eeed85c4662942e0c9e557d36fa0d26a938058e5 (patch) | |
tree | 3e6e267779cd0de15b1dfb8543e399023a4b1342 /webkit/fileapi/file_system_url_request_job.h | |
parent | fe2534f1d0294dadd3bc915982ef378906a2be57 (diff) | |
download | chromium_src-eeed85c4662942e0c9e557d36fa0d26a938058e5.zip chromium_src-eeed85c4662942e0c9e557d36fa0d26a938058e5.tar.gz chromium_src-eeed85c4662942e0c9e557d36fa0d26a938058e5.tar.bz2 |
Merge 82266 - Fixed file/directory url resolution for external mount point provider.Per Eric's request, refactored FileSystemDirURLRequestJob and FileSystemURLRequestJob classes to resolve local file system through a new operation.BUG=chromium-os:14225TEST=added new test cases to FileSystemPathManagerTest.*, added FileSystemOperationTest.TestGetLocalFilePathSuccessReview URL: http://codereview.chromium.org/6864040
TBR=zelidrag@chromium.org
Review URL: http://codereview.chromium.org/6882102
git-svn-id: svn://svn.chromium.org/chrome/branches/742/src@82372 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_url_request_job.h')
-rw-r--r-- | webkit/fileapi/file_system_url_request_job.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/webkit/fileapi/file_system_url_request_job.h b/webkit/fileapi/file_system_url_request_job.h index 6d0f6e3..dd3c45c 100644 --- a/webkit/fileapi/file_system_url_request_job.h +++ b/webkit/fileapi/file_system_url_request_job.h @@ -17,6 +17,7 @@ #include "net/base/completion_callback.h" #include "net/http/http_byte_range.h" #include "net/url_request/url_request_job.h" +#include "webkit/fileapi/file_system_url_request_job_base.h" class GURL; @@ -25,13 +26,13 @@ class FileStream; } namespace fileapi { -class FileSystemPathManager; +class FileSystemContext; // A request job that handles reading filesystem: URLs -class FileSystemURLRequestJob : public net::URLRequestJob { +class FileSystemURLRequestJob : public FileSystemURLRequestJobBase { public: FileSystemURLRequestJob( - net::URLRequest* request, FileSystemPathManager* path_manager, + net::URLRequest* request, FileSystemContext* file_system_context, scoped_refptr<base::MessageLoopProxy> file_thread_proxy); // URLRequestJob methods: @@ -46,35 +47,27 @@ class FileSystemURLRequestJob : public net::URLRequestJob { // FilterContext methods (via URLRequestJob): virtual bool GetMimeType(std::string* mime_type) const; + protected: + // FileSystemURLRequestJobBase methods. + virtual void DidGetLocalPath(const FilePath& local_path); + private: virtual ~FileSystemURLRequestJob(); - void StartAsync(); - void DidGetRootPath(bool success, const FilePath& root_path, - const std::string& name); void DidResolve(base::PlatformFileError error_code, const base::PlatformFileInfo& file_info); void DidOpen(base::PlatformFileError error_code, base::PassPlatformFile file, bool created); void DidRead(int result); - void NotifyFailed(int rv); - - FilePath relative_file_path_; - FilePath absolute_file_path_; - FileSystemPathManager* const path_manager_; - + ScopedRunnableMethodFactory<FileSystemURLRequestJob> method_factory_; + base::ScopedCallbackFactory<FileSystemURLRequestJob> callback_factory_; net::CompletionCallbackImpl<FileSystemURLRequestJob> io_callback_; scoped_ptr<net::FileStream> stream_; bool is_directory_; scoped_ptr<net::HttpResponseInfo> response_info_; - - net::HttpByteRange byte_range_; int64 remaining_bytes_; - - ScopedRunnableMethodFactory<FileSystemURLRequestJob> method_factory_; - base::ScopedCallbackFactory<FileSystemURLRequestJob> callback_factory_; - scoped_refptr<base::MessageLoopProxy> file_thread_proxy_; + net::HttpByteRange byte_range_; DISALLOW_COPY_AND_ASSIGN(FileSystemURLRequestJob); }; |