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

Side by Side Diff: content/public/common/mhtml_generation_params.cc

Issue 2013633003: Adding a command-line flag to set MHTML generation options. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove empty line Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/common/mhtml_generation_params.h" 5 #include "content/public/common/mhtml_generation_params.h"
6 6
7 #include "base/command_line.h"
7 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "content/public/common/content_switches.h"
8 10
9 namespace content { 11 namespace content {
10 12
11 MHTMLGenerationParams::MHTMLGenerationParams(const base::FilePath& file_path) 13 MHTMLGenerationParams::MHTMLGenerationParams(const base::FilePath& file_path)
12 : file_path(file_path) {} 14 : file_path(file_path) {
15
Charlie Reis 2016/05/25 00:01:33 nit: No blank line needed here.
Dmitry Titov 2016/05/25 00:27:14 Done.
16 // Check which variant of MHTML generation is required.
17 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.
18 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
19 switches::kMHTMLGeneratorOption);
20
21 if (MHTMLGeneratorOptionFlag == switches::kMHTMLSkipNostoreMain) {
22 cache_control_policy =
23 blink::WebFrameSerializerCacheControlPolicy::
24 FailForNoStoreMainFrame;
25 } else if (MHTMLGeneratorOptionFlag == switches::kMHTMLSkipNostoreAll) {
26 cache_control_policy =
27 blink::WebFrameSerializerCacheControlPolicy::
28 SkipAnyFrameOrResourceMarkedNoStore;
29 }
30
Charlie Reis 2016/05/25 00:01:33 nit: No blank line needed here.
Dmitry Titov 2016/05/25 00:27:14 Done.
31 }
13 32
14 } // namespace content 33 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698