Index: chrome/browser/android/crash_dump_manager.h |
diff --git a/chrome/browser/android/crash_dump_manager.h b/chrome/browser/android/crash_dump_manager.h |
index 6cfe49738f6a04a56b06d9ff39aa7e1fbd6eaef8..3a46b27e84f3e08446da18e832d7175f68bd7d43 100644 |
--- a/chrome/browser/android/crash_dump_manager.h |
+++ b/chrome/browser/android/crash_dump_manager.h |
@@ -11,6 +11,7 @@ |
#include "base/platform_file.h" |
#include "base/process.h" |
#include "base/synchronization/lock.h" |
+#include "content/public/browser/browser_child_process_observer.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
@@ -27,7 +28,8 @@ class RenderProcessHost; |
// a file descriptor where to write the minidump in the event of a crash. |
// This class creates these file descriptors and associates them with render |
// processes and take the appropriate action when the render process terminates. |
-class CrashDumpManager : public content::NotificationObserver { |
+class CrashDumpManager : public content::BrowserChildProcessObserver, |
+ public content::NotificationObserver { |
public: |
// This object is a singleton created and owned by the |
// ChromeBrowserMainPartsAndroid. |
@@ -39,6 +41,12 @@ class CrashDumpManager : public content::NotificationObserver { |
// the process |child_process_id|. |
int CreateMinidumpFile(int child_process_id); |
+ // content::BrowserChildProcessObserver implementation: |
+ virtual void BrowserChildProcessHostDisconnected( |
+ const content::ChildProcessData& data) OVERRIDE; |
+ virtual void BrowserChildProcessCrashed( |
+ const content::ChildProcessData& data) OVERRIDE; |
+ |
private: |
friend class ChromeBrowserMainPartsAndroid; |
@@ -55,6 +63,9 @@ class CrashDumpManager : public content::NotificationObserver { |
const content::NotificationSource& source, |
const content::NotificationDetails& details) OVERRIDE; |
+ // Called on child process exit (including crash). |
+ void OnChildExit(int child_process_id, base::ProcessHandle pid); |
+ |
content::NotificationRegistrar notification_registrar_; |
// This map should only be accessed with its lock aquired as it is accessed |