Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Unified Diff: Source/WebCore/loader/DataUriResource.cpp

Issue 14188008: Move Data uri handling into WebCore Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/loader/DataUriResource.h ('k') | Source/WebCore/loader/DocumentLoader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/loader/DataUriResource.cpp
diff --git a/Source/WebCore/loader/archive/ArchiveResource.cpp b/Source/WebCore/loader/DataUriResource.cpp
similarity index 73%
copy from Source/WebCore/loader/archive/ArchiveResource.cpp
copy to Source/WebCore/loader/DataUriResource.cpp
index 7dedc934ae66a9904eecac0a53d56c2d004c4c5f..2a896e9e508879fd78c40cd2f3c0f75f69029918 100644
--- a/Source/WebCore/loader/archive/ArchiveResource.cpp
+++ b/Source/WebCore/loader/DataUriResource.cpp
@@ -27,36 +27,33 @@
*/
#include "config.h"
-#include "ArchiveResource.h"
+#include "DataUriResource.h"
#include "SharedBuffer.h"
namespace WebCore {
-inline ArchiveResource::ArchiveResource(PassRefPtr<SharedBuffer> data, const KURL& url, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse& response)
+inline DataUriResource::DataUriResource(PassRefPtr<SharedBuffer> data, const KURL& url, const String& mimeType, const String& textEncoding, const ResourceResponse& response)
: SubstituteResource(url, response, data)
, m_mimeType(mimeType)
, m_textEncoding(textEncoding)
- , m_frameName(frameName)
- , m_shouldIgnoreWhenUnarchiving(false)
{
}
-PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse& response)
+PassRefPtr<DataUriResource> DataUriResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const String& mimeType, const String& textEncoding, const ResourceResponse& response)
{
if (!data)
return 0;
if (response.isNull()) {
unsigned dataSize = data->size();
- return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName,
- ResourceResponse(url, mimeType, dataSize, textEncoding, String())));
+ return adoptRef(new DataUriResource(data, url, mimeType, textEncoding, ResourceResponse(url, mimeType, dataSize, textEncoding, String())));
}
- return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName, response));
+ return adoptRef(new DataUriResource(data, url, mimeType, textEncoding, response));
}
-PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const ResourceResponse& response)
+PassRefPtr<DataUriResource> DataUriResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const ResourceResponse& response)
{
- return create(data, url, response.mimeType(), response.textEncodingName(), String(), response);
+ return create(data, url, response.mimeType(), response.textEncodingName(), response);
}
}
« no previous file with comments | « Source/WebCore/loader/DataUriResource.h ('k') | Source/WebCore/loader/DocumentLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698