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

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

Issue 8672001: Revert 111252 - Switch MHTMLGenerationManager to use a Callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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
===================================================================
--- content/browser/download/mhtml_generation_manager.h (revision 111255)
+++ content/browser/download/mhtml_generation_manager.h (working copy)
@@ -24,20 +24,21 @@
MHTMLGenerationManager();
~MHTMLGenerationManager();
- typedef base::Callback<void(const FilePath& /* path to the MHTML file */,
- int64 /* size of the file */)> GenerateMHTMLCallback;
-
// Instructs the render view to generate a MHTML representation of the current
// page for |tab_contents|.
- void GenerateMHTML(TabContents* tab_contents,
- const FilePath& file,
- const GenerateMHTMLCallback& callback);
+ void GenerateMHTML(TabContents* tab_contents, const FilePath& file);
// Notification from the renderer that the MHTML generation finished.
// |mhtml_data_size| contains the size in bytes of the generated MHTML data,
// or -1 in case of failure.
void MHTMLGenerated(int job_id, int64 mhtml_data_size);
+ // The details sent along with the MHTML_GENERATED notification.
+ struct NotificationDetails {
+ FilePath file_path;
+ int64 file_size;
+ };
+
private:
struct Job{
Job();
@@ -52,9 +53,6 @@
// The IDs mapping to a specific tab.
int process_id;
int routing_id;
-
- // The callback to call once generation is complete.
- GenerateMHTMLCallback callback;
};
// Called on the file thread to create |file|.
« no previous file with comments | « content/browser/download/mhtml_generation_browsertest.cc ('k') | content/browser/download/mhtml_generation_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698