Chromium Code Reviews| Index: third_party/WebKit/public/web/WebFrameSerializer.h |
| diff --git a/third_party/WebKit/public/web/WebFrameSerializer.h b/third_party/WebKit/public/web/WebFrameSerializer.h |
| index ecf4acfbf639421962af3284cc66d21db20e2c70..221cf54cf0bdb205e59ec3bb9175184a01241fdb 100644 |
| --- a/third_party/WebKit/public/web/WebFrameSerializer.h |
| +++ b/third_party/WebKit/public/web/WebFrameSerializer.h |
| @@ -47,6 +47,15 @@ template <typename T> class WebVector; |
| // Serialization of frame contents into html or mhtml. |
| class WebFrameSerializer { |
| public: |
| + // By default, frame serialization encompasses all resources in a page. If it |
| + // is desirable to serialize only those resources that could be stored by a http |
| + // cache, the other options may be used. |
| + // FIXME: Add more policies for subframes and subresources. |
|
Łukasz Anforowicz
2016/05/12 18:56:49
nit: I've been told by other reviewers to prefer T
dewittj
2016/05/12 22:58:01
Done.
|
| + enum CacheControlPolicy { |
| + CacheControlPolicyIgnore, |
| + CacheControlPolicyFailForNoStoreMainFrame |
| + }; |
| + |
| // Generates and returns an MHTML header. |
|
Łukasz Anforowicz
2016/05/12 18:56:49
nit: This should describe the new return value / t
dewittj
2016/05/12 22:58:02
Done.
|
| // |
| // Contents of the header (i.e. title and mime type) will be based |
| @@ -56,8 +65,9 @@ public: |
| // Same |boundary| needs to used for all generateMHTMLHeader and |
| // generateMHTMLParts and generateMHTMLFooter calls that belong to the same |
| // MHTML document (see also rfc1341, section 7.2.1, "boundary" description). |
| - BLINK_EXPORT static WebData generateMHTMLHeader( |
| - const WebString& boundary, WebLocalFrame*); |
| + BLINK_EXPORT static bool generateMHTMLHeader( |
| + const WebString& boundary, CacheControlPolicy, WebLocalFrame*, |
| + WebData*); |
| // Delegate for controling the behavior of generateMHTMLParts method. |
| class MHTMLPartsGenerationDelegate { |