OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 CONTENT_BROWSER_ANDROID_URL_REQUEST_CONTENT_JOB_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_URL_REQUEST_CONTENT_JOB_H_ |
6 #define CONTENT_BROWSER_ANDROID_URL_REQUEST_CONTENT_JOB_H_ | 6 #define CONTENT_BROWSER_ANDROID_URL_REQUEST_CONTENT_JOB_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // Callback after seeking to the beginning of |byte_range_| in the content URI | 81 // Callback after seeking to the beginning of |byte_range_| in the content URI |
82 // on a background thread. | 82 // on a background thread. |
83 void DidSeek(int64_t result); | 83 void DidSeek(int64_t result); |
84 | 84 |
85 // Callback after data is asynchronously read from the content URI into |buf|. | 85 // Callback after data is asynchronously read from the content URI into |buf|. |
86 void DidRead(int result); | 86 void DidRead(int result); |
87 | 87 |
88 // The full path of the content URI. | 88 // The full path of the content URI. |
89 base::FilePath content_path_; | 89 base::FilePath content_path_; |
90 | 90 |
91 scoped_ptr<net::FileStream> stream_; | 91 std::unique_ptr<net::FileStream> stream_; |
92 ContentMetaInfo meta_info_; | 92 ContentMetaInfo meta_info_; |
93 const scoped_refptr<base::TaskRunner> content_task_runner_; | 93 const scoped_refptr<base::TaskRunner> content_task_runner_; |
94 | 94 |
95 net::HttpByteRange byte_range_; | 95 net::HttpByteRange byte_range_; |
96 net::Error range_parse_result_; | 96 net::Error range_parse_result_; |
97 int64_t remaining_bytes_; | 97 int64_t remaining_bytes_; |
98 | 98 |
99 bool io_pending_; | 99 bool io_pending_; |
100 | 100 |
101 base::WeakPtrFactory<URLRequestContentJob> weak_ptr_factory_; | 101 base::WeakPtrFactory<URLRequestContentJob> weak_ptr_factory_; |
102 | 102 |
103 DISALLOW_COPY_AND_ASSIGN(URLRequestContentJob); | 103 DISALLOW_COPY_AND_ASSIGN(URLRequestContentJob); |
104 }; | 104 }; |
105 | 105 |
106 } // namespace content | 106 } // namespace content |
107 | 107 |
108 #endif // CONTENT_BROWSER_ANDROID_URL_REQUEST_CONTENT_JOB_H_ | 108 #endif // CONTENT_BROWSER_ANDROID_URL_REQUEST_CONTENT_JOB_H_ |
OLD | NEW |