| 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 #include "wtf/RefPtr.h" | 42 #include "wtf/RefPtr.h" |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| 46 namespace { | 46 namespace { |
| 47 | 47 |
| 48 class ExtraDataContainer : public ResourceResponse::ExtraData { | 48 class ExtraDataContainer : public ResourceResponse::ExtraData { |
| 49 public: | 49 public: |
| 50 static PassRefPtr<ExtraDataContainer> create(WebURLResponse::ExtraData* extr
aData) { return adoptRef(new ExtraDataContainer(extraData)); } | 50 static PassRefPtr<ExtraDataContainer> create(WebURLResponse::ExtraData* extr
aData) { return adoptRef(new ExtraDataContainer(extraData)); } |
| 51 | 51 |
| 52 virtual ~ExtraDataContainer() { } | 52 ~ExtraDataContainer() override {} |
| 53 | 53 |
| 54 WebURLResponse::ExtraData* extraData() const { return m_extraData.get(); } | 54 WebURLResponse::ExtraData* extraData() const { return m_extraData.get(); } |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 explicit ExtraDataContainer(WebURLResponse::ExtraData* extraData) | 57 explicit ExtraDataContainer(WebURLResponse::ExtraData* extraData) |
| 58 : m_extraData(adoptPtr(extraData)) | 58 : m_extraData(adoptPtr(extraData)) |
| 59 { | 59 { |
| 60 } | 60 } |
| 61 | 61 |
| 62 OwnPtr<WebURLResponse::ExtraData> m_extraData; | 62 OwnPtr<WebURLResponse::ExtraData> m_extraData; |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 // Subclasses may call this directly so a self-assignment check is needed | 469 // Subclasses may call this directly so a self-assignment check is needed |
| 470 // here as well as in the public assign method. | 470 // here as well as in the public assign method. |
| 471 if (m_private == p) | 471 if (m_private == p) |
| 472 return; | 472 return; |
| 473 if (m_private) | 473 if (m_private) |
| 474 m_private->dispose(); | 474 m_private->dispose(); |
| 475 m_private = p; | 475 m_private = p; |
| 476 } | 476 } |
| 477 | 477 |
| 478 } // namespace blink | 478 } // namespace blink |
| OLD | NEW |