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

Unified Diff: components/crash/content/browser/crash_dump_manager_android.h

Issue 1473753002: Re-land "Add stats to distinguish android renderer crashes." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix per review. Created 5 years 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: components/crash/content/browser/crash_dump_manager_android.h
diff --git a/components/crash/content/browser/crash_dump_manager_android.h b/components/crash/content/browser/crash_dump_manager_android.h
index e3f2391efe775851903cdfa88b6617599c646109..3699d9834621515abb7902ea9ec014eff3239789 100644
--- a/components/crash/content/browser/crash_dump_manager_android.h
+++ b/components/crash/content/browser/crash_dump_manager_android.h
@@ -7,13 +7,16 @@
#include <map>
+#include "base/android/application_status_listener.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
+#include "base/process/kill.h"
#include "base/process/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"
+#include "content/public/common/process_type.h"
namespace content {
class RenderProcessHost;
@@ -48,8 +51,23 @@ class CrashDumpManager : public content::BrowserChildProcessObserver,
private:
typedef std::map<int, base::FilePath> ChildProcessIDToMinidumpPath;
+ // This enum is used to back a UMA histogram, and must be treated as
+ // append-only.
+ enum ExitStatus {
+ EMPTY_MINIDUMP_WHILE_RUNNING,
+ EMPTY_MINIDUMP_WHILE_PAUSED,
+ EMPTY_MINIDUMP_WHILE_BACKGROUND,
+ VALID_MINIDUMP_WHILE_RUNNING,
+ VALID_MINIDUMP_WHILE_PAUSED,
+ VALID_MINIDUMP_WHILE_BACKGROUND,
+ MINIDUMP_STATUS_COUNT
+ };
+
static void ProcessMinidump(const base::FilePath& minidump_path,
- base::ProcessHandle pid);
+ base::ProcessHandle pid,
+ content::ProcessType process_type,
+ base::TerminationStatus exit_status,
+ base::android::ApplicationState app_state);
// content::BrowserChildProcessObserver implementation:
void BrowserChildProcessHostDisconnected(
@@ -64,7 +82,11 @@ class CrashDumpManager : public content::BrowserChildProcessObserver,
const content::NotificationDetails& details) override;
// Called on child process exit (including crash).
- void OnChildExit(int child_process_id, base::ProcessHandle pid);
+ void OnChildExit(int child_process_id,
+ base::ProcessHandle pid,
+ content::ProcessType process_type,
+ base::TerminationStatus exit_status,
+ base::android::ApplicationState app_state);
content::NotificationRegistrar notification_registrar_;

Powered by Google App Engine
This is Rietveld 408576698