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

Unified Diff: content/browser/download/mhtml_generation_manager.h

Issue 2842653002: [Offline Pages] Generate MHTML header in the browser process. (Closed)
Patch Set: Update format string for gcc error. 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/download/mhtml_generation_manager.h
diff --git a/content/browser/download/mhtml_generation_manager.h b/content/browser/download/mhtml_generation_manager.h
index e30001535b03735758e09f2734d69ce5cd1c03d7..f096d39c2b388b89cc22ee3897129aae2dfaa3c0 100644
--- a/content/browser/download/mhtml_generation_manager.h
+++ b/content/browser/download/mhtml_generation_manager.h
@@ -61,16 +61,22 @@ class MHTMLGenerationManager {
private:
friend struct base::DefaultSingletonTraits<MHTMLGenerationManager>;
class Job;
+ struct FileCreationResult {
+ base::File file;
+ int header_size = 0;
+ };
MHTMLGenerationManager();
virtual ~MHTMLGenerationManager();
// Called on the file thread to create |file|.
carlosk 2017/04/25 01:28:08 Append "and write the MHTML header into it".
- static base::File CreateFile(const base::FilePath& file_path);
+ static FileCreationResult CreateFileAndWriteHeader(
+ const base::FilePath& file_path,
+ const std::string& header);
// Called on the UI thread when the file that should hold the MHTML data has
// been created.
- void OnFileAvailable(int job_id, base::File browser_file);
+ void OnFileAvailable(int job_id, FileCreationResult result);
// Called on the UI thread when a job has been finished.
void JobFinished(Job* job, MhtmlSaveStatus save_status);

Powered by Google App Engine
This is Rietveld 408576698