summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_url_request_job.h
diff options
context:
space:
mode:
authoradamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-19 23:39:56 +0000
committeradamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-19 23:39:56 +0000
commit483cad04e9efc1b42f8b2b5b118a95a5650d3c3e (patch)
tree9b36f45f614a08e6c81798bb093101181dec195c /webkit/fileapi/file_system_url_request_job.h
parent048a1d02a9e9e42e63df1a26417d3f79494afb7c (diff)
downloadchromium_src-483cad04e9efc1b42f8b2b5b118a95a5650d3c3e.zip
chromium_src-483cad04e9efc1b42f8b2b5b118a95a5650d3c3e.tar.gz
chromium_src-483cad04e9efc1b42f8b2b5b118a95a5650d3c3e.tar.bz2
Use appropriate FileSystemOperations in "filesystem:" URLRequestJobs.
FileSystemURLRequestJob now calls GetMetadata(), while FileSystemDirURLRequestJob calls ReadDirectory(). With neither calling GetLocalPath(), the need for FileSystemURLRequestJobBase has disappeared, as has the need for FileSystemOperation::GetLocalPath and FileSystemCallbackDispatcher::DidGetLocalPath(). The only changes in behavior due to this patch are: - ReadDirectory is now called on the URL, so it will still work properly after the obsfuscated filesystem is in use. - FileSystemDirURLRequestJob has been fixed to show a directory header. This was somehow lost in the refactor to use FileSystemURLRequestJobBase. - The error codes for "file not found" are now always net::ERR_FILE_NOT_FOUND. R=ericu@chromium.org Review URL: http://codereview.chromium.org/7047013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86015 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.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/webkit/fileapi/file_system_url_request_job.h b/webkit/fileapi/file_system_url_request_job.h
index dd3c45c..38baaba 100644
--- a/webkit/fileapi/file_system_url_request_job.h
+++ b/webkit/fileapi/file_system_url_request_job.h
@@ -17,7 +17,6 @@
#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;
@@ -29,10 +28,11 @@ namespace fileapi {
class FileSystemContext;
// A request job that handles reading filesystem: URLs
-class FileSystemURLRequestJob : public FileSystemURLRequestJobBase {
+class FileSystemURLRequestJob : public net::URLRequestJob {
public:
FileSystemURLRequestJob(
- net::URLRequest* request, FileSystemContext* file_system_context,
+ net::URLRequest* request,
+ FileSystemContext* file_system_context,
scoped_refptr<base::MessageLoopProxy> file_thread_proxy);
// URLRequestJob methods:
@@ -47,23 +47,26 @@ class FileSystemURLRequestJob : public FileSystemURLRequestJobBase {
// FilterContext methods (via URLRequestJob):
virtual bool GetMimeType(std::string* mime_type) const;
- protected:
- // FileSystemURLRequestJobBase methods.
- virtual void DidGetLocalPath(const FilePath& local_path);
-
private:
+ class CallbackDispatcher;
+
virtual ~FileSystemURLRequestJob();
- void DidResolve(base::PlatformFileError error_code,
- const base::PlatformFileInfo& file_info);
+ void StartAsync();
+ void DidGetMetadata(const base::PlatformFileInfo& file_info,
+ const FilePath& platform_path);
void DidOpen(base::PlatformFileError error_code,
base::PassPlatformFile file, bool created);
void DidRead(int result);
+ void NotifyFailed(int rv);
+ FileSystemContext* file_system_context_;
+ scoped_refptr<base::MessageLoopProxy> file_thread_proxy_;
ScopedRunnableMethodFactory<FileSystemURLRequestJob> method_factory_;
base::ScopedCallbackFactory<FileSystemURLRequestJob> callback_factory_;
net::CompletionCallbackImpl<FileSystemURLRequestJob> io_callback_;
scoped_ptr<net::FileStream> stream_;
+ FilePath absolute_file_path_;
bool is_directory_;
scoped_ptr<net::HttpResponseInfo> response_info_;
int64 remaining_bytes_;