OLD | NEW |
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 WriteParam(m, p.expected_modification_time()); | 49 WriteParam(m, p.expected_modification_time()); |
50 break; | 50 break; |
51 } | 51 } |
52 case storage::DataElement::TYPE_FILE_FILESYSTEM: { | 52 case storage::DataElement::TYPE_FILE_FILESYSTEM: { |
53 WriteParam(m, p.filesystem_url()); | 53 WriteParam(m, p.filesystem_url()); |
54 WriteParam(m, p.offset()); | 54 WriteParam(m, p.offset()); |
55 WriteParam(m, p.length()); | 55 WriteParam(m, p.length()); |
56 WriteParam(m, p.expected_modification_time()); | 56 WriteParam(m, p.expected_modification_time()); |
57 break; | 57 break; |
58 } | 58 } |
59 default: { | 59 case storage::DataElement::TYPE_BLOB: { |
60 DCHECK(p.type() == storage::DataElement::TYPE_BLOB); | |
61 WriteParam(m, p.blob_uuid()); | 60 WriteParam(m, p.blob_uuid()); |
62 WriteParam(m, p.offset()); | 61 WriteParam(m, p.offset()); |
63 WriteParam(m, p.length()); | 62 WriteParam(m, p.length()); |
64 break; | 63 break; |
65 } | 64 } |
| 65 case storage::DataElement::TYPE_DISK_CACHE_ENTRY: // Can't be sent via IPC. |
| 66 NOTREACHED(); |
| 67 break; |
| 68 case storage::DataElement::TYPE_UNKNOWN: |
| 69 NOTREACHED(); |
| 70 break; |
66 } | 71 } |
67 } | 72 } |
68 | 73 |
69 bool ParamTraits<storage::DataElement>::Read(const Message* m, | 74 bool ParamTraits<storage::DataElement>::Read(const Message* m, |
70 base::PickleIterator* iter, | 75 base::PickleIterator* iter, |
71 param_type* r) { | 76 param_type* r) { |
72 int type; | 77 int type; |
73 if (!ReadParam(m, iter, &type)) | 78 if (!ReadParam(m, iter, &type)) |
74 return false; | 79 return false; |
75 switch (type) { | 80 switch (type) { |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 (*r)->set_identifier(identifier); | 298 (*r)->set_identifier(identifier); |
294 return true; | 299 return true; |
295 } | 300 } |
296 | 301 |
297 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log( | 302 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log( |
298 const param_type& p, std::string* l) { | 303 const param_type& p, std::string* l) { |
299 l->append("<ResourceRequestBody>"); | 304 l->append("<ResourceRequestBody>"); |
300 } | 305 } |
301 | 306 |
302 } // namespace IPC | 307 } // namespace IPC |
OLD | NEW |