OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_REQUEST_JOB_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_REQUEST_JOB_H_ |
6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_REQUEST_JOB_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_REQUEST_JOB_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 | 11 |
10 #include "base/basictypes.h" | |
11 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/macros.h" |
12 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
13 #include "components/drive/file_errors.h" | 15 #include "components/drive/file_errors.h" |
14 #include "net/base/net_errors.h" | 16 #include "net/base/net_errors.h" |
15 #include "net/http/http_byte_range.h" | 17 #include "net/http/http_byte_range.h" |
16 #include "net/url_request/url_request_job.h" | 18 #include "net/url_request/url_request_job.h" |
17 #include "storage/browser/fileapi/file_stream_reader.h" | 19 #include "storage/browser/fileapi/file_stream_reader.h" |
18 #include "storage/browser/fileapi/file_system_url.h" | 20 #include "storage/browser/fileapi/file_system_url.h" |
19 | 21 |
20 namespace net { | 22 namespace net { |
21 class IOBuffer; | 23 class IOBuffer; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 const base::File::Info& file_info); | 93 const base::File::Info& file_info); |
92 | 94 |
93 // Called when DriveFileStreamReader::Read is completed. | 95 // Called when DriveFileStreamReader::Read is completed. |
94 void OnReadCompleted(int read_result); | 96 void OnReadCompleted(int read_result); |
95 | 97 |
96 void* const profile_id_; | 98 void* const profile_id_; |
97 | 99 |
98 // The range of the file to be returned. | 100 // The range of the file to be returned. |
99 net::Error range_parse_result_; | 101 net::Error range_parse_result_; |
100 net::HttpByteRange byte_range_; | 102 net::HttpByteRange byte_range_; |
101 int64 remaining_bytes_; | 103 int64_t remaining_bytes_; |
102 | 104 |
103 scoped_refptr<storage::FileSystemContext> file_system_context_; | 105 scoped_refptr<storage::FileSystemContext> file_system_context_; |
104 scoped_ptr<IsolatedFileSystemScope> isolated_file_system_scope_; | 106 scoped_ptr<IsolatedFileSystemScope> isolated_file_system_scope_; |
105 storage::FileSystemURL file_system_url_; | 107 storage::FileSystemURL file_system_url_; |
106 std::string mime_type_; | 108 std::string mime_type_; |
107 scoped_ptr<storage::FileStreamReader> stream_reader_; | 109 scoped_ptr<storage::FileStreamReader> stream_reader_; |
108 GURL redirect_url_; | 110 GURL redirect_url_; |
109 | 111 |
110 // This should remain the last member so it'll be destroyed first and | 112 // This should remain the last member so it'll be destroyed first and |
111 // invalidate its weak pointers before other members are destroyed. | 113 // invalidate its weak pointers before other members are destroyed. |
112 base::WeakPtrFactory<ExternalFileURLRequestJob> weak_ptr_factory_; | 114 base::WeakPtrFactory<ExternalFileURLRequestJob> weak_ptr_factory_; |
113 DISALLOW_COPY_AND_ASSIGN(ExternalFileURLRequestJob); | 115 DISALLOW_COPY_AND_ASSIGN(ExternalFileURLRequestJob); |
114 }; | 116 }; |
115 | 117 |
116 } // namespace chromeos | 118 } // namespace chromeos |
117 | 119 |
118 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_REQUEST_JOB_H_ | 120 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_REQUEST_JOB_H_ |
OLD | NEW |