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

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: fix unit tests 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 (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.
64 NOTREACHED();
65 break;
66 case storage::DataElement::TYPE_UNKNOWN:
67 NOTREACHED();
68 break;
64 } 69 }
65 } 70 }
66 71
67 bool ParamTraits<storage::DataElement>::Read(const Message* m, 72 bool ParamTraits<storage::DataElement>::Read(const Message* m,
68 PickleIterator* iter, 73 PickleIterator* iter,
69 param_type* r) { 74 param_type* r) {
70 int type; 75 int type;
71 if (!ReadParam(m, iter, &type)) 76 if (!ReadParam(m, iter, &type))
72 return false; 77 return false;
73 switch (type) { 78 switch (type) {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 (*r)->set_identifier(identifier); 293 (*r)->set_identifier(identifier);
289 return true; 294 return true;
290 } 295 }
291 296
292 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log( 297 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log(
293 const param_type& p, std::string* l) { 298 const param_type& p, std::string* l) {
294 l->append("<ResourceRequestBody>"); 299 l->append("<ResourceRequestBody>");
295 } 300 }
296 301
297 } // namespace IPC 302 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698