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

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

Issue 1108083002: Create blobs from Disk Cache entries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remediate + windows build Created 5 years, 6 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 "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/elements_upload_data_stream.h" 10 #include "net/base/elements_upload_data_stream.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 element.filesystem_url(), 128 element.filesystem_url(),
129 element.offset(), 129 element.offset(),
130 element.length(), 130 element.length(),
131 element.expected_modification_time())); 131 element.expected_modification_time()));
132 break; 132 break;
133 case ResourceRequestBody::Element::TYPE_BLOB: 133 case ResourceRequestBody::Element::TYPE_BLOB:
134 // Blob elements should be resolved beforehand. 134 // Blob elements should be resolved beforehand.
135 // TODO(dmurph): Create blob reader and store the snapshot in there. 135 // TODO(dmurph): Create blob reader and store the snapshot in there.
136 NOTREACHED(); 136 NOTREACHED();
137 break; 137 break;
138 case ResourceRequestBody::Element::TYPE_DISK_CACHE_ENTRY:
139 // Disk cache entries should not be uploaded, instead only requested
140 // from blink.
mmenke 2015/06/12 18:52:42 Are you sure this comment about them being request
michaeln 2015/06/12 23:43:06 Once something in blink has a Blob backed by a dis
gavinp 2015/06/15 14:01:19 Ahhh, OK. So right now I think this is safe, becau
gavinp 2015/06/15 14:01:19 Blobs are a mess as well; in particular, blobs hav
141 NOTREACHED();
142 break;
138 case ResourceRequestBody::Element::TYPE_UNKNOWN: 143 case ResourceRequestBody::Element::TYPE_UNKNOWN:
139 NOTREACHED(); 144 NOTREACHED();
140 break; 145 break;
141 } 146 }
142 } 147 }
143 148
144 return make_scoped_ptr( 149 return make_scoped_ptr(
145 new net::ElementsUploadDataStream(element_readers.Pass(), 150 new net::ElementsUploadDataStream(element_readers.Pass(),
146 body->identifier())); 151 body->identifier()));
147 } 152 }
148 153
149 } // namespace content 154 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698