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

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

Issue 2683493002: Get signals working in the EXTRA_DATA section of MHTML (Closed)
Patch Set: FIx tests, add unit test Created 3 years, 9 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 #ifndef CONTENT_PUBLIC_COMMON_MHTML_GENERATION_PARAMS_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_MHTML_GENERATION_PARAMS_H_
6 #define CONTENT_PUBLIC_COMMON_MHTML_GENERATION_PARAMS_H_ 6 #define CONTENT_PUBLIC_COMMON_MHTML_GENERATION_PARAMS_H_
7 7
8 #include <string>
9 #include <vector>
romax 2017/03/14 19:08:06 seems like vector is not being used
Pete Williamson 2017/03/15 22:38:22 Ended up reverting this file
10
8 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
9 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
10 #include "third_party/WebKit/public/web/WebFrameSerializerCacheControlPolicy.h" 13 #include "third_party/WebKit/public/web/WebFrameSerializerCacheControlPolicy.h"
11 14
12 namespace content { 15 namespace content {
13 16
14 struct CONTENT_EXPORT MHTMLGenerationParams { 17 struct CONTENT_EXPORT MHTMLGenerationParams {
15 MHTMLGenerationParams(const base::FilePath& file_path); 18 MHTMLGenerationParams(const base::FilePath& file_path);
16 ~MHTMLGenerationParams() = default; 19
20 ~MHTMLGenerationParams();
21
22 // We need a copy constructor since we have a complex subtype.
23 MHTMLGenerationParams(const MHTMLGenerationParams& other);
17 24
18 // The file that will contain the generated MHTML. 25 // The file that will contain the generated MHTML.
19 base::FilePath file_path; 26 base::FilePath file_path;
20 27
21 // Uses Content-Transfer-Encoding: binary when encoding. See 28 // Uses Content-Transfer-Encoding: binary when encoding. See
22 // https://tools.ietf.org/html/rfc2045 for details about 29 // https://tools.ietf.org/html/rfc2045 for details about
23 // Content-Transfer-Encoding. 30 // Content-Transfer-Encoding.
24 bool use_binary_encoding = false; 31 bool use_binary_encoding = false;
25 32
26 // By default, MHTML includes all subresources. This flag can be used to 33 // By default, MHTML includes all subresources. This flag can be used to
27 // cause the generator to fail or silently ignore resources if the 34 // cause the generator to fail or silently ignore resources if the
28 // Cache-Control header is used. 35 // Cache-Control header is used.
29 blink::WebFrameSerializerCacheControlPolicy cache_control_policy = 36 blink::WebFrameSerializerCacheControlPolicy cache_control_policy =
30 blink::WebFrameSerializerCacheControlPolicy::None; 37 blink::WebFrameSerializerCacheControlPolicy::None;
31 38
32 // Removes popups that could obstruct the user's view of normal content. 39 // Removes popups that could obstruct the user's view of normal content.
33 bool remove_popup_overlay = false; 40 bool remove_popup_overlay = false;
41
42 // Extra data to be included when generating the MHTML - for example,
43 // logging the signals that were received before capturing this MHTML
44 // for background offlining.
45 std::string extra_data;
34 }; 46 };
35 47
36 } // namespace content 48 } // namespace content
37 49
38 #endif // CONTENT_PUBLIC_COMMON_MHTML_GENERATION_PARAMS_H_ 50 #endif // CONTENT_PUBLIC_COMMON_MHTML_GENERATION_PARAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698