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

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: Created 7 years, 5 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 efc6b46039e43f52bcdf4d0ba88445743e4a2b34..7f83f27dc892db8dd96357a4443a8e78ed1f0208 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();
@@ -37,6 +39,11 @@ class MHTMLGenerationManager {
// or -1 in case of failure.
void MHTMLGenerated(int job_id, int64 mhtml_data_size);
+ // Implementation of NotificationObserver.
Jay Civelli 2013/08/01 17:57:00 Nit: could be moved to the private section.
qsr 2013/08/02 14:22:24 Done.
+ virtual void Observe(int type,
+ const NotificationSource& source,
+ const NotificationDetails& details) OVERRIDE;
+
private:
friend struct DefaultSingletonTraits<MHTMLGenerationManager>;
@@ -85,6 +92,7 @@ class MHTMLGenerationManager {
typedef std::map<int, Job> IDToJobMap;
IDToJobMap id_to_job_;
+ NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(MHTMLGenerationManager);
};

Powered by Google App Engine
This is Rietveld 408576698