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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 } | 362 } |
363 | 363 |
364 WebURLResponse::ExtraData* WebURLResponse::getExtraData() const { | 364 WebURLResponse::ExtraData* WebURLResponse::getExtraData() const { |
365 RefPtr<ResourceResponse::ExtraData> data = m_resourceResponse->getExtraData(); | 365 RefPtr<ResourceResponse::ExtraData> data = m_resourceResponse->getExtraData(); |
366 if (!data) | 366 if (!data) |
367 return 0; | 367 return 0; |
368 return static_cast<ExtraDataContainer*>(data.get())->getExtraData(); | 368 return static_cast<ExtraDataContainer*>(data.get())->getExtraData(); |
369 } | 369 } |
370 | 370 |
371 void WebURLResponse::setExtraData(WebURLResponse::ExtraData* extraData) { | 371 void WebURLResponse::setExtraData(WebURLResponse::ExtraData* extraData) { |
372 m_resourceResponse->setExtraData(ExtraDataContainer::create(extraData)); | 372 if (extraData != getExtraData()) |
| 373 m_resourceResponse->setExtraData(ExtraDataContainer::create(extraData)); |
373 } | 374 } |
374 | 375 |
375 void WebURLResponse::appendRedirectResponse(const WebURLResponse& response) { | 376 void WebURLResponse::appendRedirectResponse(const WebURLResponse& response) { |
376 m_resourceResponse->appendRedirectResponse(response.toResourceResponse()); | 377 m_resourceResponse->appendRedirectResponse(response.toResourceResponse()); |
377 } | 378 } |
378 | 379 |
379 WebURLResponse::WebURLResponse(ResourceResponse& r) : m_resourceResponse(&r) {} | 380 WebURLResponse::WebURLResponse(ResourceResponse& r) : m_resourceResponse(&r) {} |
380 | 381 |
381 } // namespace blink | 382 } // namespace blink |
OLD | NEW |