| 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 <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 // TODO(gavinp): If Build() is called with a DataElement of | 181 // TODO(gavinp): If Build() is called with a DataElement of |
| 182 // TYPE_DISK_CACHE_ENTRY then this code won't work because we won't call | 182 // TYPE_DISK_CACHE_ENTRY then this code won't work because we won't call |
| 183 // ResolveBlobReference() and so we won't find |item|. Is this OK? | 183 // ResolveBlobReference() and so we won't find |item|. Is this OK? |
| 184 const storage::BlobDataItem* item = element_and_blob_item_pair.second; | 184 const storage::BlobDataItem* item = element_and_blob_item_pair.second; |
| 185 element_readers.push_back( | 185 element_readers.push_back( |
| 186 new DiskCacheElementReader(body, item->disk_cache_entry(), | 186 new DiskCacheElementReader(body, item->disk_cache_entry(), |
| 187 item->disk_cache_stream_index(), | 187 item->disk_cache_stream_index(), |
| 188 element)); | 188 element)); |
| 189 break; | 189 break; |
| 190 } | 190 } |
| 191 case ResourceRequestBody::Element::TYPE_BYTES_DESCRIPTION: |
| 191 case ResourceRequestBody::Element::TYPE_UNKNOWN: | 192 case ResourceRequestBody::Element::TYPE_UNKNOWN: |
| 192 NOTREACHED(); | 193 NOTREACHED(); |
| 193 break; | 194 break; |
| 194 } | 195 } |
| 195 } | 196 } |
| 196 | 197 |
| 197 return make_scoped_ptr( | 198 return make_scoped_ptr( |
| 198 new net::ElementsUploadDataStream(element_readers.Pass(), | 199 new net::ElementsUploadDataStream(element_readers.Pass(), |
| 199 body->identifier())); | 200 body->identifier())); |
| 200 } | 201 } |
| 201 | 202 |
| 202 } // namespace content | 203 } // namespace content |
| OLD | NEW |