| 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 } | 357 } |
| 358 | 358 |
| 359 WebURLRequest::ExtraData* WebURLRequest::getExtraData() const { | 359 WebURLRequest::ExtraData* WebURLRequest::getExtraData() const { |
| 360 RefPtr<ResourceRequest::ExtraData> data = m_resourceRequest->getExtraData(); | 360 RefPtr<ResourceRequest::ExtraData> data = m_resourceRequest->getExtraData(); |
| 361 if (!data) | 361 if (!data) |
| 362 return 0; | 362 return 0; |
| 363 return static_cast<ExtraDataContainer*>(data.get())->getExtraData(); | 363 return static_cast<ExtraDataContainer*>(data.get())->getExtraData(); |
| 364 } | 364 } |
| 365 | 365 |
| 366 void WebURLRequest::setExtraData(WebURLRequest::ExtraData* extraData) { | 366 void WebURLRequest::setExtraData(WebURLRequest::ExtraData* extraData) { |
| 367 m_resourceRequest->setExtraData(ExtraDataContainer::create(extraData)); | 367 if (extraData != getExtraData()) |
| 368 m_resourceRequest->setExtraData(ExtraDataContainer::create(extraData)); |
| 368 } | 369 } |
| 369 | 370 |
| 370 ResourceRequest& WebURLRequest::toMutableResourceRequest() { | 371 ResourceRequest& WebURLRequest::toMutableResourceRequest() { |
| 371 DCHECK(m_resourceRequest); | 372 DCHECK(m_resourceRequest); |
| 372 return *m_resourceRequest; | 373 return *m_resourceRequest; |
| 373 } | 374 } |
| 374 | 375 |
| 375 WebURLRequest::Priority WebURLRequest::getPriority() const { | 376 WebURLRequest::Priority WebURLRequest::getPriority() const { |
| 376 return static_cast<WebURLRequest::Priority>(m_resourceRequest->priority()); | 377 return static_cast<WebURLRequest::Priority>(m_resourceRequest->priority()); |
| 377 } | 378 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 } | 428 } |
| 428 | 429 |
| 429 const ResourceRequest& WebURLRequest::toResourceRequest() const { | 430 const ResourceRequest& WebURLRequest::toResourceRequest() const { |
| 430 DCHECK(m_resourceRequest); | 431 DCHECK(m_resourceRequest); |
| 431 return *m_resourceRequest; | 432 return *m_resourceRequest; |
| 432 } | 433 } |
| 433 | 434 |
| 434 WebURLRequest::WebURLRequest(ResourceRequest& r) : m_resourceRequest(&r) {} | 435 WebURLRequest::WebURLRequest(ResourceRequest& r) : m_resourceRequest(&r) {} |
| 435 | 436 |
| 436 } // namespace blink | 437 } // namespace blink |
| OLD | NEW |