Chromium Code Reviews| 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..f40121ea3257b4ebca58b7c4ecceb813f6381539 100644 |
| --- a/content/public/common/mhtml_generation_params.cc |
| +++ b/content/public/common/mhtml_generation_params.cc |
| @@ -4,11 +4,30 @@ |
| #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) { |
| + |
|
Charlie Reis
2016/05/25 00:01:33
nit: No blank line needed here.
Dmitry Titov
2016/05/25 00:27:14
Done.
|
| + // Check which variant of MHTML generation is required. |
| + std::string MHTMLGeneratorOptionFlag = |
|
Charlie Reis
2016/05/25 00:01:33
nit: This should start lowercase.
Dmitry Titov
2016/05/25 00:27:14
Done.
|
| + 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; |
| + } |
| + |
|
Charlie Reis
2016/05/25 00:01:33
nit: No blank line needed here.
Dmitry Titov
2016/05/25 00:27:14
Done.
|
| +} |
| } // namespace content |