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 28 matching lines...) Expand all Loading... |
39 #include "public/platform/WebURL.h" | 39 #include "public/platform/WebURL.h" |
40 | 40 |
41 namespace blink { | 41 namespace blink { |
42 | 42 |
43 namespace { | 43 namespace { |
44 | 44 |
45 class ExtraDataContainer : public ResourceRequest::ExtraData { | 45 class ExtraDataContainer : public ResourceRequest::ExtraData { |
46 public: | 46 public: |
47 static PassRefPtr<ExtraDataContainer> create(WebURLRequest::ExtraData* extra
Data) { return adoptRef(new ExtraDataContainer(extraData)); } | 47 static PassRefPtr<ExtraDataContainer> create(WebURLRequest::ExtraData* extra
Data) { return adoptRef(new ExtraDataContainer(extraData)); } |
48 | 48 |
49 virtual ~ExtraDataContainer() { } | 49 ~ExtraDataContainer() override {} |
50 | 50 |
51 WebURLRequest::ExtraData* extraData() const { return m_extraData.get(); } | 51 WebURLRequest::ExtraData* extraData() const { return m_extraData.get(); } |
52 | 52 |
53 private: | 53 private: |
54 explicit ExtraDataContainer(WebURLRequest::ExtraData* extraData) | 54 explicit ExtraDataContainer(WebURLRequest::ExtraData* extraData) |
55 : m_extraData(adoptPtr(extraData)) | 55 : m_extraData(adoptPtr(extraData)) |
56 { | 56 { |
57 } | 57 } |
58 | 58 |
59 OwnPtr<WebURLRequest::ExtraData> m_extraData; | 59 OwnPtr<WebURLRequest::ExtraData> m_extraData; |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 // Subclasses may call this directly so a self-assignment check is needed | 449 // Subclasses may call this directly so a self-assignment check is needed |
450 // here as well as in the public assign method. | 450 // here as well as in the public assign method. |
451 if (m_private == p) | 451 if (m_private == p) |
452 return; | 452 return; |
453 if (m_private) | 453 if (m_private) |
454 m_private->dispose(); | 454 m_private->dispose(); |
455 m_private = p; | 455 m_private = p; |
456 } | 456 } |
457 | 457 |
458 } // namespace blink | 458 } // namespace blink |
OLD | NEW |