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

Side by Side Diff: content/browser/loader/upload_data_stream_builder.cc

Issue 1288373002: [BlobAsync] Patch 2: Common Constants (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@async1
Patch Set: Created 5 years, 4 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
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | content/child/blob_storage/blob_consolidation.cc » ('j') | content/common/blob_storage/blob_storage_messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698