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