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

Side by Side Diff: content/common/resource_messages.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/common/resource_messages.h" 5 #include "content/common/resource_messages.h"
6 6
7 #include "net/base/load_timing_info.h" 7 #include "net/base/load_timing_info.h"
8 #include "net/http/http_response_headers.h" 8 #include "net/http/http_response_headers.h"
9 9
10 namespace IPC { 10 namespace IPC {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 WriteParam(m, p.expected_modification_time()); 47 WriteParam(m, p.expected_modification_time());
48 break; 48 break;
49 } 49 }
50 case storage::DataElement::TYPE_FILE_FILESYSTEM: { 50 case storage::DataElement::TYPE_FILE_FILESYSTEM: {
51 WriteParam(m, p.filesystem_url()); 51 WriteParam(m, p.filesystem_url());
52 WriteParam(m, p.offset()); 52 WriteParam(m, p.offset());
53 WriteParam(m, p.length()); 53 WriteParam(m, p.length());
54 WriteParam(m, p.expected_modification_time()); 54 WriteParam(m, p.expected_modification_time());
55 break; 55 break;
56 } 56 }
57 default: { 57 case storage::DataElement::TYPE_BLOB: {
58 DCHECK(p.type() == storage::DataElement::TYPE_BLOB);
59 WriteParam(m, p.blob_uuid()); 58 WriteParam(m, p.blob_uuid());
60 WriteParam(m, p.offset()); 59 WriteParam(m, p.offset());
61 WriteParam(m, p.length()); 60 WriteParam(m, p.length());
62 break; 61 break;
63 } 62 }
63 case storage::DataElement::TYPE_DISK_CACHE_ENTRY: // Can't be sent via IPC.
jkarlin 2015/05/29 14:59:41 Add NOTREACHED() so you can distinguish between di
gavinp 2015/05/29 18:06:07 Done.
64 case storage::DataElement::TYPE_UNKNOWN:
65 NOTREACHED();
64 } 66 }
65 } 67 }
66 68
67 bool ParamTraits<storage::DataElement>::Read(const Message* m, 69 bool ParamTraits<storage::DataElement>::Read(const Message* m,
68 PickleIterator* iter, 70 PickleIterator* iter,
69 param_type* r) { 71 param_type* r) {
70 int type; 72 int type;
71 if (!ReadParam(m, iter, &type)) 73 if (!ReadParam(m, iter, &type))
72 return false; 74 return false;
73 switch (type) { 75 switch (type) {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 (*r)->set_identifier(identifier); 290 (*r)->set_identifier(identifier);
289 return true; 291 return true;
290 } 292 }
291 293
292 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log( 294 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log(
293 const param_type& p, std::string* l) { 295 const param_type& p, std::string* l) {
294 l->append("<ResourceRequestBody>"); 296 l->append("<ResourceRequestBody>");
295 } 297 }
296 298
297 } // namespace IPC 299 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698