| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 l->append(")"); | 389 l->append(")"); |
| 390 } | 390 } |
| 391 | 391 |
| 392 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::GetSize( | 392 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::GetSize( |
| 393 base::PickleSizer* s, | 393 base::PickleSizer* s, |
| 394 const param_type& p) { | 394 const param_type& p) { |
| 395 GetParamSize(s, p.get() != NULL); | 395 GetParamSize(s, p.get() != NULL); |
| 396 if (p.get()) { | 396 if (p.get()) { |
| 397 GetParamSize(s, *p->elements()); | 397 GetParamSize(s, *p->elements()); |
| 398 GetParamSize(s, p->identifier()); | 398 GetParamSize(s, p->identifier()); |
| 399 GetParamSize(s, p->contains_sensitive_info()); |
| 399 } | 400 } |
| 400 } | 401 } |
| 401 | 402 |
| 402 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Write( | 403 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Write( |
| 403 base::Pickle* m, | 404 base::Pickle* m, |
| 404 const param_type& p) { | 405 const param_type& p) { |
| 405 WriteParam(m, p.get() != NULL); | 406 WriteParam(m, p.get() != NULL); |
| 406 if (p.get()) { | 407 if (p.get()) { |
| 407 WriteParam(m, *p->elements()); | 408 WriteParam(m, *p->elements()); |
| 408 WriteParam(m, p->identifier()); | 409 WriteParam(m, p->identifier()); |
| 410 WriteParam(m, p->contains_sensitive_info()); |
| 409 } | 411 } |
| 410 } | 412 } |
| 411 | 413 |
| 412 bool ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Read( | 414 bool ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Read( |
| 413 const base::Pickle* m, | 415 const base::Pickle* m, |
| 414 base::PickleIterator* iter, | 416 base::PickleIterator* iter, |
| 415 param_type* r) { | 417 param_type* r) { |
| 416 bool has_object; | 418 bool has_object; |
| 417 if (!ReadParam(m, iter, &has_object)) | 419 if (!ReadParam(m, iter, &has_object)) |
| 418 return false; | 420 return false; |
| 419 if (!has_object) | 421 if (!has_object) |
| 420 return true; | 422 return true; |
| 421 std::vector<storage::DataElement> elements; | 423 std::vector<storage::DataElement> elements; |
| 422 if (!ReadParam(m, iter, &elements)) | 424 if (!ReadParam(m, iter, &elements)) |
| 423 return false; | 425 return false; |
| 424 int64_t identifier; | 426 int64_t identifier; |
| 425 if (!ReadParam(m, iter, &identifier)) | 427 if (!ReadParam(m, iter, &identifier)) |
| 426 return false; | 428 return false; |
| 429 bool contains_sensitive_info; |
| 430 if (!ReadParam(m, iter, &contains_sensitive_info)) |
| 431 return false; |
| 427 *r = new content::ResourceRequestBodyImpl; | 432 *r = new content::ResourceRequestBodyImpl; |
| 428 (*r)->swap_elements(&elements); | 433 (*r)->swap_elements(&elements); |
| 429 (*r)->set_identifier(identifier); | 434 (*r)->set_identifier(identifier); |
| 435 (*r)->set_contains_sensitive_info(contains_sensitive_info); |
| 430 return true; | 436 return true; |
| 431 } | 437 } |
| 432 | 438 |
| 433 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Log( | 439 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Log( |
| 434 const param_type& p, | 440 const param_type& p, |
| 435 std::string* l) { | 441 std::string* l) { |
| 436 l->append("<ResourceRequestBodyImpl>"); | 442 l->append("<ResourceRequestBodyImpl>"); |
| 437 } | 443 } |
| 438 | 444 |
| 439 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::GetSize( | 445 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::GetSize( |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 return true; | 480 return true; |
| 475 } | 481 } |
| 476 | 482 |
| 477 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::Log( | 483 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::Log( |
| 478 const param_type& p, | 484 const param_type& p, |
| 479 std::string* l) { | 485 std::string* l) { |
| 480 l->append("<SignedCertificateTimestamp>"); | 486 l->append("<SignedCertificateTimestamp>"); |
| 481 } | 487 } |
| 482 | 488 |
| 483 } // namespace IPC | 489 } // namespace IPC |
| OLD | NEW |