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

Side by Side Diff: content/public/browser/mhtml_extra_parts.h

Issue 2683493002: Get signals working in the EXTRA_DATA section of MHTML (Closed)
Patch Set: Change header for our data to be X-Chrome- instead of Chromium- Created 3 years, 8 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_BROWSER_MHTML_EXTRA_PARTS_H_
6 #define CONTENT_PUBLIC_BROWSER_MHTML_EXTRA_PARTS_H_
7
8 #include "base/supports_user_data.h"
9 #include "content/public/browser/web_contents.h"
10
11 namespace content {
12
13 // Interface class for adding an extra part to MHTML when doing MHTML
14 // generation. To use it, get it from the web contents with FromWebContents,
15 // then call AddExtraMHTMLPart to add a new part.
16 class CONTENT_EXPORT MHTMLExtraParts : public base::SupportsUserData::Data {
17 public:
18 // Retrieves the extra data from the web contents.
19 static MHTMLExtraParts* FromWebContents(WebContents* contents);
20
21 // Add an extra MHTML part to the data structure stored by the WebContents.
22 // This will take care of generating the boundary line. This will also set
23 // the content-type and content-location headers to the values provided, and
24 // use the body provided.
25 virtual void AddExtraMHTMLPart(const std::string& content_type,
26 const std::string& content_location,
27 const std::string& body) = 0;
28
29 // Returns the number of extra parts added.
30 virtual int64_t size() = 0;
fgorski 2017/04/05 18:59:13 make this method const, please, per earlier commen
Pete Williamson 2017/04/05 22:11:30 Left as is, same reason as earlier comment.
31 };
32
33 } // namespace content
34
35 #endif // CONTENT_PUBLIC_BROWSER_MHTML_EXTRA_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698