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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 (*r)->swap_elements(&elements); | 427 (*r)->swap_elements(&elements); |
428 (*r)->set_identifier(identifier); | 428 (*r)->set_identifier(identifier); |
429 return true; | 429 return true; |
430 } | 430 } |
431 | 431 |
432 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log( | 432 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log( |
433 const param_type& p, std::string* l) { | 433 const param_type& p, std::string* l) { |
434 l->append("<ResourceRequestBody>"); | 434 l->append("<ResourceRequestBody>"); |
435 } | 435 } |
436 | 436 |
| 437 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::GetSize( |
| 438 base::PickleSizer* s, |
| 439 const param_type& p) { |
| 440 GetParamSize(s, p.get() != NULL); |
| 441 if (p.get()) { |
| 442 GetParamSize(s, static_cast<unsigned int>(p->version)); |
| 443 GetParamSize(s, p->log_id); |
| 444 GetParamSize(s, p->timestamp); |
| 445 GetParamSize(s, p->extensions); |
| 446 GetParamSize(s, static_cast<unsigned int>(p->signature.hash_algorithm)); |
| 447 GetParamSize(s, |
| 448 static_cast<unsigned int>(p->signature.signature_algorithm)); |
| 449 GetParamSize(s, p->signature.signature_data); |
| 450 GetParamSize(s, static_cast<unsigned int>(p->origin)); |
| 451 GetParamSize(s, p->log_description); |
| 452 } |
| 453 } |
| 454 |
| 455 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::Write( |
| 456 base::Pickle* m, |
| 457 const param_type& p) { |
| 458 WriteParam(m, p.get() != NULL); |
| 459 if (p.get()) |
| 460 p->Persist(m); |
| 461 } |
| 462 |
| 463 bool ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::Read( |
| 464 const base::Pickle* m, |
| 465 base::PickleIterator* iter, |
| 466 param_type* r) { |
| 467 bool has_object; |
| 468 if (!ReadParam(m, iter, &has_object)) |
| 469 return false; |
| 470 if (has_object) |
| 471 *r = net::ct::SignedCertificateTimestamp::CreateFromPickle(iter); |
| 472 return true; |
| 473 } |
| 474 |
| 475 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::Log( |
| 476 const param_type& p, |
| 477 std::string* l) { |
| 478 l->append("<SignedCertificateTimestamp>"); |
| 479 } |
| 480 |
437 } // namespace IPC | 481 } // namespace IPC |
OLD | NEW |