| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2010 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 : m_url(url) | 35 : m_url(url) |
| 36 , m_response(response) | 36 , m_response(response) |
| 37 , m_data(data) | 37 , m_data(data) |
| 38 , m_mimeType(mimeType) | 38 , m_mimeType(mimeType) |
| 39 , m_textEncoding(textEncoding) | 39 , m_textEncoding(textEncoding) |
| 40 , m_frameName(frameName) | 40 , m_frameName(frameName) |
| 41 { | 41 { |
| 42 ASSERT(m_data); | 42 ASSERT(m_data); |
| 43 } | 43 } |
| 44 | 44 |
| 45 PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> dat
a, const KURL& url, const AtomicString& mimeType, const AtomicString& textEncodi
ng, const String& frameName, const ResourceResponse& response) | 45 ArchiveResource::~ArchiveResource() |
| 46 { |
| 47 } |
| 48 |
| 49 PassRefPtrWillBeRawPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<Share
dBuffer> data, const KURL& url, const AtomicString& mimeType, const AtomicString
& textEncoding, const String& frameName, const ResourceResponse& response) |
| 46 { | 50 { |
| 47 if (!data) | 51 if (!data) |
| 48 return nullptr; | 52 return nullptr; |
| 49 if (response.isNull()) { | 53 if (response.isNull()) { |
| 50 unsigned dataSize = data->size(); | 54 const ResourceResponse& resourceResponse = ResourceResponse(url, mimeTyp
e, data->size(), textEncoding, String()); |
| 51 return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, f
rameName, | 55 return adoptRefWillBeNoop(new ArchiveResource(data, url, mimeType, textE
ncoding, frameName, resourceResponse)); |
| 52 ResourceResponse(url, mimeType, dataSize, textEncoding, String()))); | |
| 53 } | 56 } |
| 54 return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frame
Name, response)); | 57 return adoptRefWillBeNoop(new ArchiveResource(data, url, mimeType, textEncod
ing, frameName, response)); |
| 55 } | 58 } |
| 56 | 59 |
| 57 PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> dat
a, const KURL& url, const ResourceResponse& response) | 60 PassRefPtrWillBeRawPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<Share
dBuffer> data, const KURL& url, const ResourceResponse& response) |
| 58 { | 61 { |
| 59 return create(data, url, response.mimeType(), response.textEncodingName(), S
tring(), response); | 62 return create(data, url, response.mimeType(), response.textEncodingName(), S
tring(), response); |
| 60 } | 63 } |
| 61 | 64 |
| 62 } | 65 } |
| OLD | NEW |