OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "content/browser/loader/upload_data_stream_builder.h" | 5 #include "content/browser/loader/upload_data_stream_builder.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/browser/fileapi/upload_file_system_file_element_reader.h" | 8 #include "content/browser/fileapi/upload_file_system_file_element_reader.h" |
9 #include "content/common/resource_request_body.h" | 9 #include "content/common/resource_request_body.h" |
10 #include "net/base/upload_bytes_element_reader.h" | 10 #include "net/base/upload_bytes_element_reader.h" |
11 #include "net/base/upload_data_stream.h" | 11 #include "net/base/upload_data_stream.h" |
12 #include "net/base/upload_file_element_reader.h" | 12 #include "net/base/upload_file_element_reader.h" |
13 #include "webkit/browser/blob/blob_data_handle.h" | 13 #include "storage/browser/blob/blob_data_handle.h" |
14 #include "webkit/browser/blob/blob_storage_context.h" | 14 #include "storage/browser/blob/blob_storage_context.h" |
15 | 15 |
16 using storage::BlobData; | 16 using storage::BlobData; |
17 using storage::BlobDataHandle; | 17 using storage::BlobDataHandle; |
18 using storage::BlobStorageContext; | 18 using storage::BlobStorageContext; |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 namespace { | 21 namespace { |
22 | 22 |
23 // A subclass of net::UploadBytesElementReader which owns ResourceRequestBody. | 23 // A subclass of net::UploadBytesElementReader which owns ResourceRequestBody. |
24 class BytesElementReader : public net::UploadBytesElementReader { | 24 class BytesElementReader : public net::UploadBytesElementReader { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 NOTREACHED(); | 131 NOTREACHED(); |
132 break; | 132 break; |
133 } | 133 } |
134 } | 134 } |
135 | 135 |
136 return make_scoped_ptr( | 136 return make_scoped_ptr( |
137 new net::UploadDataStream(element_readers.Pass(), body->identifier())); | 137 new net::UploadDataStream(element_readers.Pass(), body->identifier())); |
138 } | 138 } |
139 | 139 |
140 } // namespace content | 140 } // namespace content |
OLD | NEW |