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

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

Issue 21512003: MHTMLGenerationManager handles the death of a render process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Makes android builder happy. Created 7 years, 4 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
« no previous file with comments | « no previous file | content/browser/download/mhtml_generation_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 efc6b46039e43f52bcdf4d0ba88445743e4a2b34..0c9ec619557eca79637c4430775b50f38c5de9f0 100644
--- a/content/browser/download/mhtml_generation_manager.h
+++ b/content/browser/download/mhtml_generation_manager.h
@@ -10,6 +10,8 @@
#include "base/memory/singleton.h"
#include "base/platform_file.h"
#include "base/process/process.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ipc/ipc_platform_file.h"
namespace base {
@@ -19,7 +21,7 @@ class FilePath;
namespace content {
class WebContents;
-class MHTMLGenerationManager {
+class MHTMLGenerationManager : public NotificationObserver {
public:
static MHTMLGenerationManager* GetInstance();
@@ -60,7 +62,7 @@ class MHTMLGenerationManager {
};
MHTMLGenerationManager();
- ~MHTMLGenerationManager();
+ virtual ~MHTMLGenerationManager();
// Called on the file thread to create |file|.
void CreateFile(int job_id,
@@ -83,8 +85,14 @@ class MHTMLGenerationManager {
// |mhtml_data_size| is -1 if the MHTML generation failed.
void JobFinished(int job_id, int64 mhtml_data_size);
+ // Implementation of NotificationObserver.
+ virtual void Observe(int type,
+ const NotificationSource& source,
+ const NotificationDetails& details) OVERRIDE;
+
typedef std::map<int, Job> IDToJobMap;
IDToJobMap id_to_job_;
+ NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(MHTMLGenerationManager);
};
« 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