Chromium Code Reviews| 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); |