| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 virtual void SetExtraRequestHeaders( | 48 virtual void SetExtraRequestHeaders( |
| 49 const HttpRequestHeaders& headers) OVERRIDE; | 49 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 result); | 52 virtual void OnSeekComplete(int64 result); |
| 53 virtual void OnReadComplete(net::IOBuffer* buf, int result); | 53 virtual void OnReadComplete(net::IOBuffer* buf, int result); |
| 54 | 54 |
| 55 protected: | 55 protected: |
| 56 virtual ~URLRequestFileJob(); | 56 virtual ~URLRequestFileJob(); |
| 57 | 57 |
| 58 int64 remaining_bytes() const { return remaining_bytes_; } |
| 59 |
| 58 // The OS-specific full path name of the file | 60 // The OS-specific full path name of the file |
| 59 base::FilePath file_path_; | 61 base::FilePath file_path_; |
| 60 | 62 |
| 61 private: | 63 private: |
| 62 // Meta information about the file. It's used as a member in the | 64 // Meta information about the file. It's used as a member in the |
| 63 // URLRequestFileJob and also passed between threads because disk access is | 65 // URLRequestFileJob and also passed between threads because disk access is |
| 64 // necessary to obtain it. | 66 // necessary to obtain it. |
| 65 struct FileMetaInfo { | 67 struct FileMetaInfo { |
| 66 FileMetaInfo(); | 68 FileMetaInfo(); |
| 67 | 69 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 int64 remaining_bytes_; | 105 int64 remaining_bytes_; |
| 104 | 106 |
| 105 base::WeakPtrFactory<URLRequestFileJob> weak_ptr_factory_; | 107 base::WeakPtrFactory<URLRequestFileJob> weak_ptr_factory_; |
| 106 | 108 |
| 107 DISALLOW_COPY_AND_ASSIGN(URLRequestFileJob); | 109 DISALLOW_COPY_AND_ASSIGN(URLRequestFileJob); |
| 108 }; | 110 }; |
| 109 | 111 |
| 110 } // namespace net | 112 } // namespace net |
| 111 | 113 |
| 112 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ | 114 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ |
| OLD | NEW |