| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "public/platform/WebStorageQuotaCallbacks.h" | 6 #include "public/platform/WebStorageQuotaCallbacks.h" |
| 7 | 7 |
| 8 #include "platform/StorageQuotaCallbacks.h" | 8 #include "platform/StorageQuotaCallbacks.h" |
| 9 #include "wtf/Forward.h" | 9 #include "wtf/Forward.h" |
| 10 #include "wtf/OwnPtr.h" | 10 #include "wtf/OwnPtr.h" |
| 11 #include "wtf/PassOwnPtr.h" | 11 #include "wtf/PassOwnPtr.h" |
| 12 #include "wtf/PassRefPtr.h" | 12 #include "wtf/PassRefPtr.h" |
| 13 #include "wtf/RefCounted.h" | 13 #include "wtf/RefCounted.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 class WebStorageQuotaCallbacksPrivate FINAL : public RefCountedWillBeGarbageColl
ected<WebStorageQuotaCallbacksPrivate> { | 17 class WebStorageQuotaCallbacksPrivate final : public RefCountedWillBeGarbageColl
ected<WebStorageQuotaCallbacksPrivate> { |
| 18 public: | 18 public: |
| 19 static PassRefPtrWillBeRawPtr<WebStorageQuotaCallbacksPrivate> create(const
PassOwnPtrWillBeRawPtr<StorageQuotaCallbacks>& callbacks) | 19 static PassRefPtrWillBeRawPtr<WebStorageQuotaCallbacksPrivate> create(const
PassOwnPtrWillBeRawPtr<StorageQuotaCallbacks>& callbacks) |
| 20 { | 20 { |
| 21 return adoptRefWillBeNoop(new WebStorageQuotaCallbacksPrivate(callbacks)
); | 21 return adoptRefWillBeNoop(new WebStorageQuotaCallbacksPrivate(callbacks)
); |
| 22 } | 22 } |
| 23 | 23 |
| 24 void trace(Visitor*); | 24 void trace(Visitor*); |
| 25 | 25 |
| 26 StorageQuotaCallbacks* callbacks() { return m_callbacks.get(); } | 26 StorageQuotaCallbacks* callbacks() { return m_callbacks.get(); } |
| 27 | 27 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 } | 65 } |
| 66 | 66 |
| 67 void WebStorageQuotaCallbacks::didFail(WebStorageQuotaError error) | 67 void WebStorageQuotaCallbacks::didFail(WebStorageQuotaError error) |
| 68 { | 68 { |
| 69 ASSERT(!m_private.isNull()); | 69 ASSERT(!m_private.isNull()); |
| 70 m_private->callbacks()->didFail(error); | 70 m_private->callbacks()->didFail(error); |
| 71 m_private.reset(); | 71 m_private.reset(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 } // namespace blink | 74 } // namespace blink |
| OLD | NEW |