| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BLOB_BLOB_URL_REQUEST_JOB_H_ | 5 #ifndef WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ |
| 6 #define WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ | 6 #define WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_callback_factory.h" | |
| 10 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 12 #include "base/platform_file.h" | 11 #include "base/platform_file.h" |
| 13 #include "base/task.h" | 12 #include "base/task.h" |
| 14 #include "net/http/http_byte_range.h" | 13 #include "net/http/http_byte_range.h" |
| 15 #include "net/url_request/url_request_job.h" | 14 #include "net/url_request/url_request_job.h" |
| 16 #include "webkit/blob/blob_data.h" | 15 #include "webkit/blob/blob_data.h" |
| 17 | 16 |
| 18 namespace base { | 17 namespace base { |
| 19 class MessageLoopProxy; | 18 class MessageLoopProxy; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 void NotifyFailure(int); | 61 void NotifyFailure(int); |
| 63 | 62 |
| 64 void DidStart(); | 63 void DidStart(); |
| 65 void DidResolve(base::PlatformFileError rv, | 64 void DidResolve(base::PlatformFileError rv, |
| 66 const base::PlatformFileInfo& file_info); | 65 const base::PlatformFileInfo& file_info); |
| 67 void DidOpen(base::PlatformFileError rv, | 66 void DidOpen(base::PlatformFileError rv, |
| 68 base::PassPlatformFile file, | 67 base::PassPlatformFile file, |
| 69 bool created); | 68 bool created); |
| 70 void DidRead(int result); | 69 void DidRead(int result); |
| 71 | 70 |
| 72 base::ScopedCallbackFactory<BlobURLRequestJob> callback_factory_; | |
| 73 base::WeakPtrFactory<BlobURLRequestJob> weak_factory_; | 71 base::WeakPtrFactory<BlobURLRequestJob> weak_factory_; |
| 74 scoped_refptr<BlobData> blob_data_; | 72 scoped_refptr<BlobData> blob_data_; |
| 75 scoped_refptr<base::MessageLoopProxy> file_thread_proxy_; | 73 scoped_refptr<base::MessageLoopProxy> file_thread_proxy_; |
| 76 std::vector<int64> item_length_list_; | 74 std::vector<int64> item_length_list_; |
| 77 scoped_ptr<net::FileStream> stream_; | 75 scoped_ptr<net::FileStream> stream_; |
| 78 size_t item_index_; | 76 size_t item_index_; |
| 79 int64 total_size_; | 77 int64 total_size_; |
| 80 int64 current_item_offset_; | 78 int64 current_item_offset_; |
| 81 int64 remaining_bytes_; | 79 int64 remaining_bytes_; |
| 82 scoped_refptr<net::IOBuffer> read_buf_; | 80 scoped_refptr<net::IOBuffer> read_buf_; |
| 83 int read_buf_offset_; | 81 int read_buf_offset_; |
| 84 int read_buf_size_; | 82 int read_buf_size_; |
| 85 int read_buf_remaining_bytes_; | 83 int read_buf_remaining_bytes_; |
| 86 int bytes_to_read_; | 84 int bytes_to_read_; |
| 87 bool error_; | 85 bool error_; |
| 88 bool headers_set_; | 86 bool headers_set_; |
| 89 bool byte_range_set_; | 87 bool byte_range_set_; |
| 90 net::HttpByteRange byte_range_; | 88 net::HttpByteRange byte_range_; |
| 91 scoped_ptr<net::HttpResponseInfo> response_info_; | 89 scoped_ptr<net::HttpResponseInfo> response_info_; |
| 92 ScopedRunnableMethodFactory<BlobURLRequestJob> method_factory_; | 90 ScopedRunnableMethodFactory<BlobURLRequestJob> method_factory_; |
| 93 | 91 |
| 94 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJob); | 92 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJob); |
| 95 }; | 93 }; |
| 96 | 94 |
| 97 } // namespace webkit_blob | 95 } // namespace webkit_blob |
| 98 | 96 |
| 99 #endif // WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ | 97 #endif // WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ |
| OLD | NEW |