| 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_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ |
| 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/platform_file.h" | 13 #include "base/platform_file.h" |
| 14 #include "net/http/http_byte_range.h" | 14 #include "net/http/http_byte_range.h" |
| 15 #include "net/url_request/url_request_job.h" | 15 #include "net/url_request/url_request_job.h" |
| 16 #include "webkit/fileapi/file_system_url.h" | 16 #include "webkit/fileapi/file_system_url.h" |
| 17 #include "webkit/storage/webkit_storage_export.h" | 17 #include "webkit/storage/webkit_storage_export.h" |
| 18 | 18 |
| 19 class GURL; | 19 class GURL; |
| 20 |
| 21 namespace base { |
| 20 class FilePath; | 22 class FilePath; |
| 23 } |
| 21 | 24 |
| 22 namespace webkit_blob { | 25 namespace webkit_blob { |
| 23 class FileStreamReader; | 26 class FileStreamReader; |
| 24 } | 27 } |
| 25 | 28 |
| 26 namespace fileapi { | 29 namespace fileapi { |
| 27 class FileSystemContext; | 30 class FileSystemContext; |
| 28 | 31 |
| 29 // A request job that handles reading filesystem: URLs | 32 // A request job that handles reading filesystem: URLs |
| 30 class WEBKIT_STORAGE_EXPORT_PRIVATE FileSystemURLRequestJob | 33 class WEBKIT_STORAGE_EXPORT_PRIVATE FileSystemURLRequestJob |
| (...skipping 22 matching lines...) Expand all Loading... |
| 53 | 56 |
| 54 private: | 57 private: |
| 55 class CallbackDispatcher; | 58 class CallbackDispatcher; |
| 56 | 59 |
| 57 virtual ~FileSystemURLRequestJob(); | 60 virtual ~FileSystemURLRequestJob(); |
| 58 | 61 |
| 59 void StartAsync(); | 62 void StartAsync(); |
| 60 void DidGetMetadata( | 63 void DidGetMetadata( |
| 61 base::PlatformFileError error_code, | 64 base::PlatformFileError error_code, |
| 62 const base::PlatformFileInfo& file_info, | 65 const base::PlatformFileInfo& file_info, |
| 63 const FilePath& platform_path); | 66 const base::FilePath& platform_path); |
| 64 void DidRead(int result); | 67 void DidRead(int result); |
| 65 void NotifyFailed(int rv); | 68 void NotifyFailed(int rv); |
| 66 | 69 |
| 67 FileSystemContext* file_system_context_; | 70 FileSystemContext* file_system_context_; |
| 68 base::WeakPtrFactory<FileSystemURLRequestJob> weak_factory_; | 71 base::WeakPtrFactory<FileSystemURLRequestJob> weak_factory_; |
| 69 scoped_ptr<webkit_blob::FileStreamReader> reader_; | 72 scoped_ptr<webkit_blob::FileStreamReader> reader_; |
| 70 FileSystemURL url_; | 73 FileSystemURL url_; |
| 71 bool is_directory_; | 74 bool is_directory_; |
| 72 scoped_ptr<net::HttpResponseInfo> response_info_; | 75 scoped_ptr<net::HttpResponseInfo> response_info_; |
| 73 int64 remaining_bytes_; | 76 int64 remaining_bytes_; |
| 74 net::HttpByteRange byte_range_; | 77 net::HttpByteRange byte_range_; |
| 75 | 78 |
| 76 DISALLOW_COPY_AND_ASSIGN(FileSystemURLRequestJob); | 79 DISALLOW_COPY_AND_ASSIGN(FileSystemURLRequestJob); |
| 77 }; | 80 }; |
| 78 | 81 |
| 79 } // namespace fileapi | 82 } // namespace fileapi |
| 80 | 83 |
| 81 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ | 84 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ |
| OLD | NEW |