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

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

Issue 1977303003: Adds a feature to MHTML serialization that omits subframes and subresources marked no-store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no-store
Patch Set: Integrate with offline pages archiver. Created 4 years, 7 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
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 6427f7e04fab9595002ef102e06221ba685c23a4..8062d275a49636a11f0c9e742a45af4703b76977 100644
--- a/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
@@ -386,11 +386,14 @@ void FrameSerializer::serializeCSSRule(CSSRule* rule)
bool FrameSerializer::shouldAddURL(const KURL& url)
{
return url.isValid() && !m_resourceURLs.contains(url) && !url.protocolIsData()
- && !m_delegate.shouldSkipResource(url);
+ && !m_delegate.shouldSkipURL(url);
}
void FrameSerializer::addToResources(Resource* resource, PassRefPtr<SharedBuffer> data, const KURL& url)
{
+ if (m_delegate.shouldSkipResource(resource))
+ return;
+
if (!data) {
DLOG(ERROR) << "No data for resource " << url.getString();
return;

Powered by Google App Engine
This is Rietveld 408576698