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

Unified Diff: third_party/WebKit/Source/core/frame/FrameSerializer.cpp

Issue 2605413002: MHTML generation: discard serialized resources by the measure they are encoded. (Closed)
Patch Set: Created 4 years 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
Index: third_party/WebKit/Source/core/frame/FrameSerializer.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameSerializer.cpp b/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
index e474669c70fe3935b7921d00b1bede6bf3404eaa..7225b31f39e2dbf55f8a2b4a68d0095ac5e2964c 100644
--- a/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
@@ -269,7 +269,7 @@ void SerializerMarkupAccumulator::appendRewrittenAttribute(
// "Webpage, Complete" method of saving a page. It will take some work but it
// needs to be done if we want to continue to support non-MHTML saved pages.
-FrameSerializer::FrameSerializer(Vector<SerializedResource>& resources,
+FrameSerializer::FrameSerializer(Deque<SerializedResource>& resources,
Delegate& delegate)
: m_resources(&resources),
m_isSerializingCss(false),
@@ -300,7 +300,7 @@ void FrameSerializer::serializeFrame(const LocalFrame& frame) {
CString frameHTML =
document.encoding().encode(text, WTF::EntitiesForUnencodables);
- m_resources->push_back(SerializedResource(
+ m_resources->append(SerializedResource(
url, document.suggestedMIMEType(),
SharedBuffer::create(frameHTML.data(), frameHTML.length())));
}
@@ -477,7 +477,7 @@ void FrameSerializer::addToResources(
return;
}
- m_resources->push_back(SerializedResource(url, mimeType, std::move(data)));
+ m_resources->append(SerializedResource(url, mimeType, std::move(data)));
m_resourceURLs.add(url);
}

Powered by Google App Engine
This is Rietveld 408576698