diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/loader/appcache/ApplicationCacheResource.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/loader/appcache/ApplicationCacheResource.h')
-rw-r--r-- | Source/WebCore/loader/appcache/ApplicationCacheResource.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/WebCore/loader/appcache/ApplicationCacheResource.h b/Source/WebCore/loader/appcache/ApplicationCacheResource.h index d8d3f1aa0..a39613fa3 100644 --- a/Source/WebCore/loader/appcache/ApplicationCacheResource.h +++ b/Source/WebCore/loader/appcache/ApplicationCacheResource.h @@ -23,8 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef ApplicationCacheResource_h -#define ApplicationCacheResource_h +#pragma once #include "SubstituteResource.h" @@ -40,10 +39,12 @@ public: Fallback = 1 << 4 }; - static PassRefPtr<ApplicationCacheResource> create(const URL& url, const ResourceResponse& response, unsigned type, PassRefPtr<SharedBuffer> buffer = SharedBuffer::create(), const String& path = String()) + static Ref<ApplicationCacheResource> create(const URL& url, const ResourceResponse& response, unsigned type, RefPtr<SharedBuffer> buffer = SharedBuffer::create(), const String& path = String()) { ASSERT(!url.hasFragmentIdentifier()); - return adoptRef(new ApplicationCacheResource(url, response, type, buffer, path)); + if (!buffer) + buffer = SharedBuffer::create(); + return adoptRef(*new ApplicationCacheResource(url, response, type, buffer.releaseNonNull(), path)); } unsigned type() const { return m_type; } @@ -62,7 +63,9 @@ public: #endif private: - ApplicationCacheResource(const URL&, const ResourceResponse&, unsigned type, PassRefPtr<SharedBuffer>, const String& path); + ApplicationCacheResource(const URL&, const ResourceResponse&, unsigned type, Ref<SharedBuffer>&&, const String& path); + + void deliver(ResourceLoader&) override; unsigned m_type; unsigned m_storageID; @@ -71,5 +74,3 @@ private: }; } // namespace WebCore - -#endif // ApplicationCacheResource_h |