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

Side by Side Diff: content/browser/download/mhtml_generation_manager.h

Issue 2344153003: Adds tracing to MHTML generation call chain. (Closed)
Patch Set: Address code review comments Created 4 years, 2 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 | « no previous file | content/browser/download/mhtml_generation_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ 4 #ifndef CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_
5 #define CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ 5 #define CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // been created. 70 // been created.
71 void OnFileAvailable(int job_id, base::File browser_file); 71 void OnFileAvailable(int job_id, base::File browser_file);
72 72
73 // Called on the UI thread when a job has been finished. 73 // Called on the UI thread when a job has been finished.
74 void JobFinished(Job* job, JobStatus job_status); 74 void JobFinished(Job* job, JobStatus job_status);
75 75
76 // Called on the UI thread after the file got finalized and we have its size. 76 // Called on the UI thread after the file got finalized and we have its size.
77 void OnFileClosed(int job_id, JobStatus job_status, int64_t file_size); 77 void OnFileClosed(int job_id, JobStatus job_status, int64_t file_size);
78 78
79 // Creates and registers a new job. 79 // Creates and registers a new job.
80 int NewJob(WebContents* web_contents, 80 Job* NewJob(WebContents* web_contents,
81 const MHTMLGenerationParams& params, 81 const MHTMLGenerationParams& params,
82 const GenerateMHTMLCallback& callback); 82 const GenerateMHTMLCallback& callback);
83 83
84 // Finds job by id. Returns nullptr if no job with a given id was found. 84 // Finds job by id. Returns nullptr if no job with a given id was found.
85 Job* FindJob(int job_id); 85 Job* FindJob(int job_id);
86 86
87 // Called when the render process connected to a job exits. 87 // Called when the render process connected to a job exits.
88 void RenderProcessExited(Job* job); 88 void RenderProcessExited(Job* job);
89 89
90 typedef std::map<int, Job*> IDToJobMap; 90 typedef std::map<int, Job*> IDToJobMap;
91 IDToJobMap id_to_job_; 91 IDToJobMap id_to_job_;
92 92
93 int next_job_id_; 93 int next_job_id_;
94 94
95 DISALLOW_COPY_AND_ASSIGN(MHTMLGenerationManager); 95 DISALLOW_COPY_AND_ASSIGN(MHTMLGenerationManager);
96 }; 96 };
97 97
98 } // namespace content 98 } // namespace content
99 99
100 #endif // CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ 100 #endif // CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/mhtml_generation_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698