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

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

Issue 2827503002: Add extra headers argument so we don't pass headers in the body. (Closed)
Patch Set: 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
« no previous file with comments | « content/browser/download/mhtml_generation_manager.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 2017 The Chromium Authors. All rights reserved. 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 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_BROWSER_MHTML_EXTRA_PARTS_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_MHTML_EXTRA_PARTS_H_
6 #define CONTENT_PUBLIC_BROWSER_MHTML_EXTRA_PARTS_H_ 6 #define CONTENT_PUBLIC_BROWSER_MHTML_EXTRA_PARTS_H_
7 7
8 #include "base/supports_user_data.h" 8 #include "base/supports_user_data.h"
9 #include "content/public/browser/web_contents.h" 9 #include "content/public/browser/web_contents.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 // Interface class for adding an extra part to MHTML when doing MHTML 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, 14 // generation. To use it, get it from the web contents with FromWebContents,
15 // then call AddExtraMHTMLPart to add a new part. 15 // then call AddExtraMHTMLPart to add a new part.
16 class CONTENT_EXPORT MHTMLExtraParts : public base::SupportsUserData::Data { 16 class CONTENT_EXPORT MHTMLExtraParts : public base::SupportsUserData::Data {
17 public: 17 public:
18 // Retrieves the extra data from the web contents. 18 // Retrieves the extra data from the web contents.
19 static MHTMLExtraParts* FromWebContents(WebContents* contents); 19 static MHTMLExtraParts* FromWebContents(WebContents* contents);
20 20
21 // Add an extra MHTML part to the data structure stored by the WebContents. 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 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 23 // the content-type and content-location headers to the values provided, and
24 // use the body provided. 24 // use the body provided.
25 virtual void AddExtraMHTMLPart(const std::string& content_type, 25 virtual void AddExtraMHTMLPart(const std::string& content_type,
26 const std::string& content_location, 26 const std::string& content_location,
27 const std::string& extra_headers,
27 const std::string& body) = 0; 28 const std::string& body) = 0;
28 29
29 // Returns the number of extra parts added. 30 // Returns the number of extra parts added.
30 virtual int64_t size() = 0; 31 virtual int64_t size() = 0;
31 }; 32 };
32 33
33 } // namespace content 34 } // namespace content
34 35
35 #endif // CONTENT_PUBLIC_BROWSER_MHTML_EXTRA_DATA_H_ 36 #endif // CONTENT_PUBLIC_BROWSER_MHTML_EXTRA_DATA_H_
OLDNEW
« no previous file with comments | « content/browser/download/mhtml_generation_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698