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

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

Issue 2683493002: Get signals working in the EXTRA_DATA section of MHTML (Closed)
Patch Set: Created 3 years, 10 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
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/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "content/public/common/content_switches.h" 9 #include "content/public/common/content_switches.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 MHTMLGenerationParams::MHTMLGenerationParams(const base::FilePath& file_path) 13 MHTMLGenerationParams::MHTMLGenerationParams(const base::FilePath& file_path)
14 : file_path(file_path) { 14 : file_path(file_path) {
15 // Check which variant of MHTML generation is required. 15 // Check which variant of MHTML generation is required.
16 std::string mhtmlGeneratorOptionFlag = 16 std::string mhtmlGeneratorOptionFlag =
17 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 17 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
18 switches::kMHTMLGeneratorOption); 18 switches::kMHTMLGeneratorOption);
19 if (mhtmlGeneratorOptionFlag == switches::kMHTMLSkipNostoreMain) { 19 if (mhtmlGeneratorOptionFlag == switches::kMHTMLSkipNostoreMain) {
20 cache_control_policy = 20 cache_control_policy =
21 blink::WebFrameSerializerCacheControlPolicy:: 21 blink::WebFrameSerializerCacheControlPolicy::
22 FailForNoStoreMainFrame; 22 FailForNoStoreMainFrame;
23 } else if (mhtmlGeneratorOptionFlag == switches::kMHTMLSkipNostoreAll) { 23 } else if (mhtmlGeneratorOptionFlag == switches::kMHTMLSkipNostoreAll) {
24 cache_control_policy = 24 cache_control_policy =
25 blink::WebFrameSerializerCacheControlPolicy:: 25 blink::WebFrameSerializerCacheControlPolicy::
26 SkipAnyFrameOrResourceMarkedNoStore; 26 SkipAnyFrameOrResourceMarkedNoStore;
27 } 27 }
28 } 28 }
29 29
30 MHTMLGenerationParams::~MHTMLGenerationParams() {}
31
32 MHTMLGenerationParams::MHTMLGenerationParams(
33 const MHTMLGenerationParams& other) {
34 file_path = other.file_path;
35 use_binary_encoding = other.use_binary_encoding;
36 cache_control_policy = other.cache_control_policy;
37 extra_data = other.extra_data;
38 }
39
30 } // namespace content 40 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698