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

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: rebased to upstream CL, review this upload 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 new content::UploadFileSystemFileElementReader( 126 new content::UploadFileSystemFileElementReader(
127 file_system_context, 127 file_system_context,
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 case ResourceRequestBody::Element::TYPE_DISK_CACHE_ENTRY:
137 break; 137 // Disk cache entries should not be uploaded, instead only requested
jkarlin 2015/05/29 14:59:41 Prefer that you put back the "NOTREACHED()" in eac
gavinp 2015/05/29 18:06:07 Done. Now I understand why it was written the oth
138 // from blink.
138 case ResourceRequestBody::Element::TYPE_UNKNOWN: 139 case ResourceRequestBody::Element::TYPE_UNKNOWN:
139 NOTREACHED(); 140 NOTREACHED();
140 break; 141 break;
141 } 142 }
142 } 143 }
143 144
144 return make_scoped_ptr( 145 return make_scoped_ptr(
145 new net::ElementsUploadDataStream(element_readers.Pass(), 146 new net::ElementsUploadDataStream(element_readers.Pass(),
146 body->identifier())); 147 body->identifier()));
147 } 148 }
148 149
149 } // namespace content 150 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698