OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 unsigned short WebURLResponse::remotePort() const | 487 unsigned short WebURLResponse::remotePort() const |
488 { | 488 { |
489 return m_private->m_resourceResponse->remotePort(); | 489 return m_private->m_resourceResponse->remotePort(); |
490 } | 490 } |
491 | 491 |
492 void WebURLResponse::setRemotePort(unsigned short remotePort) | 492 void WebURLResponse::setRemotePort(unsigned short remotePort) |
493 { | 493 { |
494 m_private->m_resourceResponse->setRemotePort(remotePort); | 494 m_private->m_resourceResponse->setRemotePort(remotePort); |
495 } | 495 } |
496 | 496 |
| 497 long long WebURLResponse::encodedBodyLength() const |
| 498 { |
| 499 return m_private->m_resourceResponse->encodedBodyLength(); |
| 500 } |
| 501 |
| 502 void WebURLResponse::addToEncodedBodyLength(long long length) |
| 503 { |
| 504 m_private->m_resourceResponse->addToEncodedBodyLength(length); |
| 505 } |
| 506 |
| 507 long long WebURLResponse::decodedBodyLength() const |
| 508 { |
| 509 return m_private->m_resourceResponse->decodedBodyLength(); |
| 510 } |
| 511 |
| 512 void WebURLResponse::addToDecodedBodyLength(long long bytes) |
| 513 { |
| 514 m_private->m_resourceResponse->addToDecodedBodyLength(bytes); |
| 515 } |
| 516 |
497 WebURLResponse::ExtraData* WebURLResponse::getExtraData() const | 517 WebURLResponse::ExtraData* WebURLResponse::getExtraData() const |
498 { | 518 { |
499 RefPtr<ResourceResponse::ExtraData> data = m_private->m_resourceResponse->ge
tExtraData(); | 519 RefPtr<ResourceResponse::ExtraData> data = m_private->m_resourceResponse->ge
tExtraData(); |
500 if (!data) | 520 if (!data) |
501 return 0; | 521 return 0; |
502 return static_cast<ExtraDataContainer*>(data.get())->getExtraData(); | 522 return static_cast<ExtraDataContainer*>(data.get())->getExtraData(); |
503 } | 523 } |
504 | 524 |
505 void WebURLResponse::setExtraData(WebURLResponse::ExtraData* extraData) | 525 void WebURLResponse::setExtraData(WebURLResponse::ExtraData* extraData) |
506 { | 526 { |
507 m_private->m_resourceResponse->setExtraData(ExtraDataContainer::create(extra
Data)); | 527 m_private->m_resourceResponse->setExtraData(ExtraDataContainer::create(extra
Data)); |
508 } | 528 } |
509 | 529 |
510 void WebURLResponse::assign(WebURLResponsePrivate* p) | 530 void WebURLResponse::assign(WebURLResponsePrivate* p) |
511 { | 531 { |
512 // Subclasses may call this directly so a self-assignment check is needed | 532 // Subclasses may call this directly so a self-assignment check is needed |
513 // here as well as in the public assign method. | 533 // here as well as in the public assign method. |
514 if (m_private == p) | 534 if (m_private == p) |
515 return; | 535 return; |
516 if (m_private) | 536 if (m_private) |
517 m_private->dispose(); | 537 m_private->dispose(); |
518 m_private = p; | 538 m_private = p; |
519 } | 539 } |
520 | 540 |
521 } // namespace blink | 541 } // namespace blink |
OLD | NEW |