| 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 NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 URLRequestFileJob(URLRequest* request, | 37 URLRequestFileJob(URLRequest* request, |
| 38 NetworkDelegate* network_delegate, | 38 NetworkDelegate* network_delegate, |
| 39 const base::FilePath& file_path, | 39 const base::FilePath& file_path, |
| 40 const scoped_refptr<base::TaskRunner>& file_task_runner); | 40 const scoped_refptr<base::TaskRunner>& file_task_runner); |
| 41 | 41 |
| 42 // URLRequestJob: | 42 // URLRequestJob: |
| 43 void Start() override; | 43 void Start() override; |
| 44 void Kill() override; | 44 void Kill() override; |
| 45 int ReadRawData(IOBuffer* buf, int buf_size) override; | 45 int ReadRawData(IOBuffer* buf, int buf_size) override; |
| 46 bool IsRedirectResponse(GURL* location, int* http_status_code) override; | 46 bool IsRedirectResponse(GURL* location, int* http_status_code) override; |
| 47 Filter* SetupFilter() const override; | 47 // Filter* SetupFilter() const override; |
| 48 bool GetMimeType(std::string* mime_type) const override; | 48 bool GetMimeType(std::string* mime_type) const override; |
| 49 void SetExtraRequestHeaders(const HttpRequestHeaders& headers) override; | 49 void SetExtraRequestHeaders(const HttpRequestHeaders& headers) override; |
| 50 | 50 |
| 51 // An interface for subclasses who wish to monitor read operations. | 51 // An interface for subclasses who wish to monitor read operations. |
| 52 virtual void OnSeekComplete(int64_t result); | 52 virtual void OnSeekComplete(int64_t result); |
| 53 virtual void OnReadComplete(IOBuffer* buf, int result); | 53 virtual void OnReadComplete(IOBuffer* buf, int result); |
| 54 | 54 |
| 55 protected: | 55 protected: |
| 56 ~URLRequestFileJob() override; | 56 ~URLRequestFileJob() override; |
| 57 | 57 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 Error range_parse_result_; | 108 Error range_parse_result_; |
| 109 | 109 |
| 110 base::WeakPtrFactory<URLRequestFileJob> weak_ptr_factory_; | 110 base::WeakPtrFactory<URLRequestFileJob> weak_ptr_factory_; |
| 111 | 111 |
| 112 DISALLOW_COPY_AND_ASSIGN(URLRequestFileJob); | 112 DISALLOW_COPY_AND_ASSIGN(URLRequestFileJob); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 } // namespace net | 115 } // namespace net |
| 116 | 116 |
| 117 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ | 117 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ |
| OLD | NEW |