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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 LogParam(p.send_end, l); | 522 LogParam(p.send_end, l); |
523 l->append(", "); | 523 l->append(", "); |
524 LogParam(p.receive_headers_end, l); | 524 LogParam(p.receive_headers_end, l); |
525 l->append(", "); | 525 l->append(", "); |
526 LogParam(p.push_start, l); | 526 LogParam(p.push_start, l); |
527 l->append(", "); | 527 l->append(", "); |
528 LogParam(p.push_end, l); | 528 LogParam(p.push_end, l); |
529 l->append(")"); | 529 l->append(")"); |
530 } | 530 } |
531 | 531 |
532 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::GetSize( | 532 void ParamTraits<scoped_refptr<content::ResourceRequestBody>>::GetSize( |
533 base::PickleSizer* s, | 533 base::PickleSizer* s, |
534 const param_type& p) { | 534 const param_type& p) { |
535 GetParamSize(s, p.get() != NULL); | 535 GetParamSize(s, p.get() != NULL); |
536 if (p.get()) { | 536 if (p.get()) { |
537 GetParamSize(s, *p->elements()); | 537 GetParamSize(s, *p->elements()); |
538 GetParamSize(s, p->identifier()); | 538 GetParamSize(s, p->identifier()); |
539 GetParamSize(s, p->contains_sensitive_info()); | 539 GetParamSize(s, p->contains_sensitive_info()); |
540 } | 540 } |
541 } | 541 } |
542 | 542 |
543 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Write( | 543 void ParamTraits<scoped_refptr<content::ResourceRequestBody>>::Write( |
544 base::Pickle* m, | 544 base::Pickle* m, |
545 const param_type& p) { | 545 const param_type& p) { |
546 WriteParam(m, p.get() != NULL); | 546 WriteParam(m, p.get() != NULL); |
547 if (p.get()) { | 547 if (p.get()) { |
548 WriteParam(m, *p->elements()); | 548 WriteParam(m, *p->elements()); |
549 WriteParam(m, p->identifier()); | 549 WriteParam(m, p->identifier()); |
550 WriteParam(m, p->contains_sensitive_info()); | 550 WriteParam(m, p->contains_sensitive_info()); |
551 } | 551 } |
552 } | 552 } |
553 | 553 |
554 bool ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Read( | 554 bool ParamTraits<scoped_refptr<content::ResourceRequestBody>>::Read( |
555 const base::Pickle* m, | 555 const base::Pickle* m, |
556 base::PickleIterator* iter, | 556 base::PickleIterator* iter, |
557 param_type* r) { | 557 param_type* r) { |
558 bool has_object; | 558 bool has_object; |
559 if (!ReadParam(m, iter, &has_object)) | 559 if (!ReadParam(m, iter, &has_object)) |
560 return false; | 560 return false; |
561 if (!has_object) | 561 if (!has_object) |
562 return true; | 562 return true; |
563 std::vector<storage::DataElement> elements; | 563 std::vector<storage::DataElement> elements; |
564 if (!ReadParam(m, iter, &elements)) | 564 if (!ReadParam(m, iter, &elements)) |
565 return false; | 565 return false; |
566 int64_t identifier; | 566 int64_t identifier; |
567 if (!ReadParam(m, iter, &identifier)) | 567 if (!ReadParam(m, iter, &identifier)) |
568 return false; | 568 return false; |
569 bool contains_sensitive_info; | 569 bool contains_sensitive_info; |
570 if (!ReadParam(m, iter, &contains_sensitive_info)) | 570 if (!ReadParam(m, iter, &contains_sensitive_info)) |
571 return false; | 571 return false; |
572 *r = new content::ResourceRequestBodyImpl; | 572 *r = new content::ResourceRequestBody; |
573 (*r)->swap_elements(&elements); | 573 (*r)->swap_elements(&elements); |
574 (*r)->set_identifier(identifier); | 574 (*r)->set_identifier(identifier); |
575 (*r)->set_contains_sensitive_info(contains_sensitive_info); | 575 (*r)->set_contains_sensitive_info(contains_sensitive_info); |
576 return true; | 576 return true; |
577 } | 577 } |
578 | 578 |
579 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Log( | 579 void ParamTraits<scoped_refptr<content::ResourceRequestBody>>::Log( |
580 const param_type& p, | 580 const param_type& p, |
581 std::string* l) { | 581 std::string* l) { |
582 l->append("<ResourceRequestBodyImpl>"); | 582 l->append("<ResourceRequestBody>"); |
583 } | 583 } |
584 | 584 |
585 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::GetSize( | 585 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::GetSize( |
586 base::PickleSizer* s, | 586 base::PickleSizer* s, |
587 const param_type& p) { | 587 const param_type& p) { |
588 GetParamSize(s, p.get() != NULL); | 588 GetParamSize(s, p.get() != NULL); |
589 if (p.get()) { | 589 if (p.get()) { |
590 GetParamSize(s, static_cast<unsigned int>(p->version)); | 590 GetParamSize(s, static_cast<unsigned int>(p->version)); |
591 GetParamSize(s, p->log_id); | 591 GetParamSize(s, p->log_id); |
592 GetParamSize(s, p->timestamp); | 592 GetParamSize(s, p->timestamp); |
(...skipping 27 matching lines...) Expand all Loading... |
620 return true; | 620 return true; |
621 } | 621 } |
622 | 622 |
623 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::Log( | 623 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::Log( |
624 const param_type& p, | 624 const param_type& p, |
625 std::string* l) { | 625 std::string* l) { |
626 l->append("<SignedCertificateTimestamp>"); | 626 l->append("<SignedCertificateTimestamp>"); |
627 } | 627 } |
628 | 628 |
629 } // namespace IPC | 629 } // namespace IPC |
OLD | NEW |