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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1947263004: Introduces a new MHTML generation parameter specifying different behvaior for cache-control headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto origin/master. 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
« no previous file with comments | « content/public/common/mhtml_generation_params.cc ('k') | content/test/data/nostore.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index e8a3eec1b8e87ce7d09fd93de129d72b7c2159eb..a602c2b935984e5a43ba1702803f64f4c13d744b 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -69,6 +69,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/context_menu_params.h"
#include "content/public/common/isolated_world_ids.h"
+#include "content/public/common/mhtml_generation_params.h"
#include "content/public/common/page_state.h"
#include "content/public/common/resource_response.h"
#include "content/public/common/url_constants.h"
@@ -4957,9 +4958,12 @@ void RenderFrameImpl::OnSerializeAsMHTML(
// Generate MHTML header if needed.
if (IsMainFrame()) {
- data =
- WebFrameSerializer::generateMHTMLHeader(mhtml_boundary, GetWebFrame());
- if (file.WriteAtCurrentPos(data.data(), data.size()) < 0) {
+ blink::WebFrameSerializerCacheControlPolicy policy =
+ static_cast<blink::WebFrameSerializerCacheControlPolicy>(
+ params.mhtml_cache_control_policy);
+ success = WebFrameSerializer::generateMHTMLHeader(mhtml_boundary, policy,
+ GetWebFrame(), &data);
+ if (success && file.WriteAtCurrentPos(data.data(), data.size()) < 0) {
success = false;
}
}
« no previous file with comments | « content/public/common/mhtml_generation_params.cc ('k') | content/test/data/nostore.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698