| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 namespace { | 44 namespace { |
| 45 | 45 |
| 46 class ExtraDataContainer : public ResourceRequest::ExtraData { | 46 class ExtraDataContainer : public ResourceRequest::ExtraData { |
| 47 public: | 47 public: |
| 48 static PassRefPtr<ExtraDataContainer> create(WebURLRequest::ExtraData* extra
Data) { return adoptRef(new ExtraDataContainer(extraData)); } | 48 static PassRefPtr<ExtraDataContainer> create(WebURLRequest::ExtraData* extra
Data) { return adoptRef(new ExtraDataContainer(extraData)); } |
| 49 | 49 |
| 50 ~ExtraDataContainer() override {} | 50 ~ExtraDataContainer() override {} |
| 51 | 51 |
| 52 WebURLRequest::ExtraData* extraData() const { return m_extraData.get(); } | 52 WebURLRequest::ExtraData* getExtraData() const { return m_extraData.get(); } |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 explicit ExtraDataContainer(WebURLRequest::ExtraData* extraData) | 55 explicit ExtraDataContainer(WebURLRequest::ExtraData* extraData) |
| 56 : m_extraData(adoptPtr(extraData)) | 56 : m_extraData(adoptPtr(extraData)) |
| 57 { | 57 { |
| 58 } | 58 } |
| 59 | 59 |
| 60 OwnPtr<WebURLRequest::ExtraData> m_extraData; | 60 OwnPtr<WebURLRequest::ExtraData> m_extraData; |
| 61 }; | 61 }; |
| 62 | 62 |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 WebURLRequest::LoFiState WebURLRequest::getLoFiState() const | 379 WebURLRequest::LoFiState WebURLRequest::getLoFiState() const |
| 380 { | 380 { |
| 381 return m_private->m_resourceRequest->loFiState(); | 381 return m_private->m_resourceRequest->loFiState(); |
| 382 } | 382 } |
| 383 | 383 |
| 384 void WebURLRequest::setLoFiState(WebURLRequest::LoFiState loFiState) | 384 void WebURLRequest::setLoFiState(WebURLRequest::LoFiState loFiState) |
| 385 { | 385 { |
| 386 return m_private->m_resourceRequest->setLoFiState(loFiState); | 386 return m_private->m_resourceRequest->setLoFiState(loFiState); |
| 387 } | 387 } |
| 388 | 388 |
| 389 WebURLRequest::ExtraData* WebURLRequest::extraData() const | 389 WebURLRequest::ExtraData* WebURLRequest::getExtraData() const |
| 390 { | 390 { |
| 391 RefPtr<ResourceRequest::ExtraData> data = m_private->m_resourceRequest->extr
aData(); | 391 RefPtr<ResourceRequest::ExtraData> data = m_private->m_resourceRequest->getE
xtraData(); |
| 392 if (!data) | 392 if (!data) |
| 393 return 0; | 393 return 0; |
| 394 return static_cast<ExtraDataContainer*>(data.get())->extraData(); | 394 return static_cast<ExtraDataContainer*>(data.get())->getExtraData(); |
| 395 } | 395 } |
| 396 | 396 |
| 397 void WebURLRequest::setExtraData(WebURLRequest::ExtraData* extraData) | 397 void WebURLRequest::setExtraData(WebURLRequest::ExtraData* extraData) |
| 398 { | 398 { |
| 399 m_private->m_resourceRequest->setExtraData(ExtraDataContainer::create(extraD
ata)); | 399 m_private->m_resourceRequest->setExtraData(ExtraDataContainer::create(extraD
ata)); |
| 400 } | 400 } |
| 401 | 401 |
| 402 ResourceRequest& WebURLRequest::toMutableResourceRequest() | 402 ResourceRequest& WebURLRequest::toMutableResourceRequest() |
| 403 { | 403 { |
| 404 ASSERT(m_private); | 404 ASSERT(m_private); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 // Subclasses may call this directly so a self-assignment check is needed | 470 // Subclasses may call this directly so a self-assignment check is needed |
| 471 // here as well as in the public assign method. | 471 // here as well as in the public assign method. |
| 472 if (m_private == p) | 472 if (m_private == p) |
| 473 return; | 473 return; |
| 474 if (m_private) | 474 if (m_private) |
| 475 m_private->dispose(); | 475 m_private->dispose(); |
| 476 m_private = p; | 476 m_private = p; |
| 477 } | 477 } |
| 478 | 478 |
| 479 } // namespace blink | 479 } // namespace blink |
| OLD | NEW |