Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Side by Side Diff: webkit/blob/blob_url_request_job.h

Issue 9402014: net: FileStream::Read/Write() to take IOBuffer* instead of char* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ 5 #ifndef WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_
6 #define WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ 6 #define WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
11 #include "net/http/http_byte_range.h" 11 #include "net/http/http_byte_range.h"
12 #include "net/url_request/url_request_job.h" 12 #include "net/url_request/url_request_job.h"
13 #include "webkit/blob/blob_data.h" 13 #include "webkit/blob/blob_data.h"
14 #include "webkit/blob/blob_export.h" 14 #include "webkit/blob/blob_export.h"
15 15
16 namespace base { 16 namespace base {
17 class MessageLoopProxy; 17 class MessageLoopProxy;
18 struct PlatformFileInfo; 18 struct PlatformFileInfo;
19 } 19 }
20 20
21 namespace net { 21 namespace net {
22 class DrainableIOBuffer;
22 class FileStream; 23 class FileStream;
24 class IOBuffer;
23 } 25 }
24 26
25 namespace webkit_blob { 27 namespace webkit_blob {
26 28
27 // A request job that handles reading blob URLs. 29 // A request job that handles reading blob URLs.
28 class BLOB_EXPORT BlobURLRequestJob : public net::URLRequestJob { 30 class BLOB_EXPORT BlobURLRequestJob : public net::URLRequestJob {
29 public: 31 public:
30 BlobURLRequestJob(net::URLRequest* request, 32 BlobURLRequestJob(net::URLRequest* request,
31 BlobData* blob_data, 33 BlobData* blob_data,
32 base::MessageLoopProxy* resolving_message_loop_proxy); 34 base::MessageLoopProxy* resolving_message_loop_proxy);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 74
73 base::WeakPtrFactory<BlobURLRequestJob> weak_factory_; 75 base::WeakPtrFactory<BlobURLRequestJob> weak_factory_;
74 scoped_refptr<BlobData> blob_data_; 76 scoped_refptr<BlobData> blob_data_;
75 scoped_refptr<base::MessageLoopProxy> file_thread_proxy_; 77 scoped_refptr<base::MessageLoopProxy> file_thread_proxy_;
76 std::vector<int64> item_length_list_; 78 std::vector<int64> item_length_list_;
77 scoped_ptr<net::FileStream> stream_; 79 scoped_ptr<net::FileStream> stream_;
78 size_t item_index_; 80 size_t item_index_;
79 int64 total_size_; 81 int64 total_size_;
80 int64 current_item_offset_; 82 int64 current_item_offset_;
81 int64 remaining_bytes_; 83 int64 remaining_bytes_;
82 scoped_refptr<net::IOBuffer> read_buf_; 84 scoped_refptr<net::DrainableIOBuffer> read_buf_;
83 int read_buf_offset_;
84 int read_buf_size_;
85 int read_buf_remaining_bytes_;
86 int bytes_to_read_; 85 int bytes_to_read_;
87 bool error_; 86 bool error_;
88 bool headers_set_; 87 bool headers_set_;
89 bool byte_range_set_; 88 bool byte_range_set_;
90 net::HttpByteRange byte_range_; 89 net::HttpByteRange byte_range_;
91 scoped_ptr<net::HttpResponseInfo> response_info_; 90 scoped_ptr<net::HttpResponseInfo> response_info_;
92 91
93 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJob); 92 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJob);
94 }; 93 };
95 94
96 } // namespace webkit_blob 95 } // namespace webkit_blob
97 96
98 #endif // WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ 97 #endif // WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698