| Index: content/public/common/mhtml_generation_params.cc
|
| diff --git a/content/public/common/mhtml_generation_params.cc b/content/public/common/mhtml_generation_params.cc
|
| index f5011aadae80acf883ede6c520b53e5d31a7e1e5..8d48664fdae6832e5cc1641a5873c1ab872a741a 100644
|
| --- a/content/public/common/mhtml_generation_params.cc
|
| +++ b/content/public/common/mhtml_generation_params.cc
|
| @@ -4,11 +4,27 @@
|
|
|
| #include "content/public/common/mhtml_generation_params.h"
|
|
|
| +#include "base/command_line.h"
|
| #include "base/files/file_path.h"
|
| +#include "content/public/common/content_switches.h"
|
|
|
| namespace content {
|
|
|
| MHTMLGenerationParams::MHTMLGenerationParams(const base::FilePath& file_path)
|
| - : file_path(file_path) {}
|
| + : file_path(file_path) {
|
| + // Check which variant of MHTML generation is required.
|
| + std::string mhtmlGeneratorOptionFlag =
|
| + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
| + switches::kMHTMLGeneratorOption);
|
| + if (mhtmlGeneratorOptionFlag == switches::kMHTMLSkipNostoreMain) {
|
| + cache_control_policy =
|
| + blink::WebFrameSerializerCacheControlPolicy::
|
| + FailForNoStoreMainFrame;
|
| + } else if (mhtmlGeneratorOptionFlag == switches::kMHTMLSkipNostoreAll) {
|
| + cache_control_policy =
|
| + blink::WebFrameSerializerCacheControlPolicy::
|
| + SkipAnyFrameOrResourceMarkedNoStore;
|
| + }
|
| +}
|
|
|
| } // namespace content
|
|
|