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

Unified Diff: chrome/browser/android/crash_dump_manager.h

Issue 12212089: content: convert child process notifications to observer usage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: private Created 7 years, 10 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 | chrome/browser/android/crash_dump_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7cf52d8039c0fcdc66e26688f5d125a8a56721d3..0c25a89c946e92750d1d1249249dfb9625b11323 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.
@@ -50,11 +52,20 @@ class CrashDumpManager : public content::NotificationObserver {
static void ProcessMinidump(const base::FilePath& minidump_path,
base::ProcessHandle pid);
+ // content::BrowserChildProcessObserver implementation:
+ virtual void BrowserChildProcessHostDisconnected(
+ const content::ChildProcessData& data) OVERRIDE;
+ virtual void BrowserChildProcessCrashed(
+ const content::ChildProcessData& data) OVERRIDE;
+
// NotificationObserver implementation:
virtual void Observe(int type,
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
« no previous file with comments | « no previous file | chrome/browser/android/crash_dump_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698