| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_ |
| 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/files/file.h" | 11 #include "base/files/file.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/message_loop/message_loop_proxy.h" | 14 #include "base/message_loop/message_loop_proxy.h" |
| 15 #include "net/url_request/url_request_job.h" | 15 #include "net/url_request/url_request_job.h" |
| 16 #include "webkit/browser/fileapi/file_system_url.h" | 16 #include "storage/browser/fileapi/file_system_url.h" |
| 17 #include "webkit/browser/webkit_storage_browser_export.h" | 17 #include "storage/common/storage_export.h" |
| 18 | 18 |
| 19 namespace fileapi { | 19 namespace storage { |
| 20 | 20 |
| 21 class FileSystemContext; | 21 class FileSystemContext; |
| 22 struct DirectoryEntry; | 22 struct DirectoryEntry; |
| 23 | 23 |
| 24 // A request job that handles reading filesystem: URLs for directories. | 24 // A request job that handles reading filesystem: URLs for directories. |
| 25 class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileSystemDirURLRequestJob | 25 class STORAGE_EXPORT_PRIVATE FileSystemDirURLRequestJob |
| 26 : public net::URLRequestJob { | 26 : public net::URLRequestJob { |
| 27 public: | 27 public: |
| 28 FileSystemDirURLRequestJob( | 28 FileSystemDirURLRequestJob(net::URLRequest* request, |
| 29 net::URLRequest* request, | 29 net::NetworkDelegate* network_delegate, |
| 30 net::NetworkDelegate* network_delegate, | 30 const std::string& storage_domain, |
| 31 const std::string& storage_domain, | 31 FileSystemContext* file_system_context); |
| 32 FileSystemContext* file_system_context); | |
| 33 | 32 |
| 34 // URLRequestJob methods: | 33 // URLRequestJob methods: |
| 35 virtual void Start() OVERRIDE; | 34 virtual void Start() OVERRIDE; |
| 36 virtual void Kill() OVERRIDE; | 35 virtual void Kill() OVERRIDE; |
| 37 virtual bool ReadRawData(net::IOBuffer* buf, | 36 virtual bool ReadRawData(net::IOBuffer* buf, |
| 38 int buf_size, | 37 int buf_size, |
| 39 int* bytes_read) OVERRIDE; | 38 int* bytes_read) OVERRIDE; |
| 40 virtual bool GetCharset(std::string* charset) OVERRIDE; | 39 virtual bool GetCharset(std::string* charset) OVERRIDE; |
| 41 | 40 |
| 42 // FilterContext methods (via URLRequestJob): | 41 // FilterContext methods (via URLRequestJob): |
| (...skipping 14 matching lines...) Expand all Loading... |
| 57 | 56 |
| 58 std::string data_; | 57 std::string data_; |
| 59 FileSystemURL url_; | 58 FileSystemURL url_; |
| 60 const std::string storage_domain_; | 59 const std::string storage_domain_; |
| 61 FileSystemContext* file_system_context_; | 60 FileSystemContext* file_system_context_; |
| 62 base::WeakPtrFactory<FileSystemDirURLRequestJob> weak_factory_; | 61 base::WeakPtrFactory<FileSystemDirURLRequestJob> weak_factory_; |
| 63 | 62 |
| 64 DISALLOW_COPY_AND_ASSIGN(FileSystemDirURLRequestJob); | 63 DISALLOW_COPY_AND_ASSIGN(FileSystemDirURLRequestJob); |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 } // namespace fileapi | 66 } // namespace storage |
| 68 | 67 |
| 69 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_ | 68 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_ |
| OLD | NEW |