| 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 STORAGE_BROWSER_BLOB_BLOB_URL_REQUEST_JOB_H_ | 5 #ifndef STORAGE_BROWSER_BLOB_BLOB_URL_REQUEST_JOB_H_ |
| 6 #define STORAGE_BROWSER_BLOB_BLOB_URL_REQUEST_JOB_H_ | 6 #define STORAGE_BROWSER_BLOB_BLOB_URL_REQUEST_JOB_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 BlobDataHandle* blob_handle, | 42 BlobDataHandle* blob_handle, |
| 43 storage::FileSystemContext* file_system_context, | 43 storage::FileSystemContext* file_system_context, |
| 44 base::SingleThreadTaskRunner* resolving_thread_task_runner); | 44 base::SingleThreadTaskRunner* resolving_thread_task_runner); |
| 45 | 45 |
| 46 // net::URLRequestJob methods. | 46 // net::URLRequestJob methods. |
| 47 void Start() override; | 47 void Start() override; |
| 48 void Kill() override; | 48 void Kill() override; |
| 49 int ReadRawData(net::IOBuffer* buf, int buf_size) override; | 49 int ReadRawData(net::IOBuffer* buf, int buf_size) override; |
| 50 bool GetMimeType(std::string* mime_type) const override; | 50 bool GetMimeType(std::string* mime_type) const override; |
| 51 void GetResponseInfo(net::HttpResponseInfo* info) override; | 51 void GetResponseInfo(net::HttpResponseInfo* info) override; |
| 52 int GetResponseCode() const override; | |
| 53 void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override; | 52 void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override; |
| 54 | 53 |
| 55 protected: | 54 protected: |
| 56 ~BlobURLRequestJob() override; | 55 ~BlobURLRequestJob() override; |
| 57 | 56 |
| 58 private: | 57 private: |
| 59 typedef std::map<size_t, FileStreamReader*> IndexToReaderMap; | 58 typedef std::map<size_t, FileStreamReader*> IndexToReaderMap; |
| 60 | 59 |
| 61 // For preparing for read: get the size, apply the range and perform seek. | 60 // For preparing for read: get the size, apply the range and perform seek. |
| 62 void DidStart(); | 61 void DidStart(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 78 std::unique_ptr<net::HttpResponseInfo> response_info_; | 77 std::unique_ptr<net::HttpResponseInfo> response_info_; |
| 79 | 78 |
| 80 base::WeakPtrFactory<BlobURLRequestJob> weak_factory_; | 79 base::WeakPtrFactory<BlobURLRequestJob> weak_factory_; |
| 81 | 80 |
| 82 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJob); | 81 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJob); |
| 83 }; | 82 }; |
| 84 | 83 |
| 85 } // namespace storage | 84 } // namespace storage |
| 86 | 85 |
| 87 #endif // STORAGE_BROWSER_BLOB_BLOB_URL_REQUEST_JOB_H_ | 86 #endif // STORAGE_BROWSER_BLOB_BLOB_URL_REQUEST_JOB_H_ |
| OLD | NEW |