Chromium Code Reviews| 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 399 } | 399 } |
| 400 } | 400 } |
| 401 | 401 |
| 402 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Write( | 402 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Write( |
| 403 base::Pickle* m, | 403 base::Pickle* m, |
| 404 const param_type& p) { | 404 const param_type& p) { |
| 405 WriteParam(m, p.get() != NULL); | 405 WriteParam(m, p.get() != NULL); |
| 406 if (p.get()) { | 406 if (p.get()) { |
| 407 WriteParam(m, *p->elements()); | 407 WriteParam(m, *p->elements()); |
| 408 WriteParam(m, p->identifier()); | 408 WriteParam(m, p->identifier()); |
| 409 WriteParam(m, p->contains_sensitive_info()); | |
| 409 } | 410 } |
| 410 } | 411 } |
| 411 | 412 |
| 412 bool ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Read( | 413 bool ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Read( |
| 413 const base::Pickle* m, | 414 const base::Pickle* m, |
| 414 base::PickleIterator* iter, | 415 base::PickleIterator* iter, |
| 415 param_type* r) { | 416 param_type* r) { |
| 416 bool has_object; | 417 bool has_object; |
| 417 if (!ReadParam(m, iter, &has_object)) | 418 if (!ReadParam(m, iter, &has_object)) |
| 418 return false; | 419 return false; |
| 419 if (!has_object) | 420 if (!has_object) |
| 420 return true; | 421 return true; |
| 421 std::vector<storage::DataElement> elements; | 422 std::vector<storage::DataElement> elements; |
| 422 if (!ReadParam(m, iter, &elements)) | 423 if (!ReadParam(m, iter, &elements)) |
| 423 return false; | 424 return false; |
| 424 int64_t identifier; | 425 int64_t identifier; |
| 425 if (!ReadParam(m, iter, &identifier)) | 426 if (!ReadParam(m, iter, &identifier)) |
| 426 return false; | 427 return false; |
| 428 bool contains_sensitive_info = false; | |
|
jam
2016/10/14 22:36:03
nit: no need to initialize
ananta
2016/10/15 00:23:31
Done.
| |
| 429 if (!ReadParam(m, iter, &contains_sensitive_info)) | |
| 430 return false; | |
| 427 *r = new content::ResourceRequestBodyImpl; | 431 *r = new content::ResourceRequestBodyImpl; |
| 428 (*r)->swap_elements(&elements); | 432 (*r)->swap_elements(&elements); |
| 429 (*r)->set_identifier(identifier); | 433 (*r)->set_identifier(identifier); |
| 434 (*r)->set_contains_sensitive_info(contains_sensitive_info); | |
| 430 return true; | 435 return true; |
| 431 } | 436 } |
| 432 | 437 |
| 433 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Log( | 438 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Log( |
| 434 const param_type& p, | 439 const param_type& p, |
| 435 std::string* l) { | 440 std::string* l) { |
| 436 l->append("<ResourceRequestBodyImpl>"); | 441 l->append("<ResourceRequestBodyImpl>"); |
| 437 } | 442 } |
| 438 | 443 |
| 439 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::GetSize( | 444 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::GetSize( |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 474 return true; | 479 return true; |
| 475 } | 480 } |
| 476 | 481 |
| 477 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::Log( | 482 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::Log( |
| 478 const param_type& p, | 483 const param_type& p, |
| 479 std::string* l) { | 484 std::string* l) { |
| 480 l->append("<SignedCertificateTimestamp>"); | 485 l->append("<SignedCertificateTimestamp>"); |
| 481 } | 486 } |
| 482 | 487 |
| 483 } // namespace IPC | 488 } // namespace IPC |
| OLD | NEW |