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

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

Issue 1474543003: Revert "Add stats to distinguish android renderer crashes." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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.cc
diff --git a/components/crash/content/browser/crash_dump_manager_android.cc b/components/crash/content/browser/crash_dump_manager_android.cc
index 1b60e20a324612af4ec8bcba41f0e5eef5beb147..62e77ad6206c83c83177a64c9d00c3ecc84ff122 100644
--- a/components/crash/content/browser/crash_dump_manager_android.cc
+++ b/components/crash/content/browser/crash_dump_manager_android.cc
@@ -8,7 +8,6 @@
#include "base/files/file_util.h"
#include "base/format_macros.h"
#include "base/logging.h"
-#include "base/metrics/histogram_macros.h"
#include "base/posix/global_descriptors.h"
#include "base/process/process.h"
#include "base/rand_util.h"
@@ -82,12 +81,8 @@ base::File CrashDumpManager::CreateMinidumpFile(int child_process_id) {
}
// static
-void CrashDumpManager::ProcessMinidump(
- const base::FilePath& minidump_path,
- base::ProcessHandle pid,
- content::ProcessType process_type,
- base::TerminationStatus exit_status,
- base::android::ApplicationState app_state) {
+void CrashDumpManager::ProcessMinidump(const base::FilePath& minidump_path,
+ base::ProcessHandle pid) {
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
CHECK(instance_);
int64 file_size = 0;
@@ -95,35 +90,6 @@ void CrashDumpManager::ProcessMinidump(
DCHECK(r) << "Failed to retrieve size for minidump "
<< minidump_path.value();
- if (process_type == content::PROCESS_TYPE_RENDERER &&
- exit_status == base::TERMINATION_STATUS_OOM_PROTECTED) {
- bool is_running =
- (app_state == base::android::APPLICATION_STATE_HAS_RUNNING_ACTIVITIES);
- bool is_paused =
- (app_state == base::android::APPLICATION_STATE_HAS_PAUSED_ACTIVITIES);
- ExitStatus renderer_exit_status;
- if (file_size == 0) {
- if (is_running) {
- renderer_exit_status = EMPTY_MINIDUMP_WHILE_RUNNING;
- } else if (is_paused) {
- renderer_exit_status = EMPTY_MINIDUMP_WHILE_PAUSED;
- } else {
- renderer_exit_status = EMPTY_MINIDUMP_WHILE_BACKGROUND;
- }
- } else {
- if (is_running) {
- renderer_exit_status = VALID_MINIDUMP_WHILE_RUNNING;
- } else if (is_paused) {
- renderer_exit_status = VALID_MINIDUMP_WHILE_PAUSED;
- } else {
- renderer_exit_status = VALID_MINIDUMP_WHILE_BACKGROUND;
- }
- }
- UMA_HISTOGRAM_ENUMERATION("Tab.RendererDetailedExitStatus",
- renderer_exit_status,
- ExitStatus::COUNT);
- }
-
if (file_size == 0) {
// Empty minidump, this process did not crash. Just remove the file.
r = base::DeleteFile(minidump_path, false);
@@ -156,21 +122,13 @@ void CrashDumpManager::ProcessMinidump(
void CrashDumpManager::BrowserChildProcessHostDisconnected(
const content::ChildProcessData& data) {
- OnChildExit(data.id,
- data.handle,
- static_cast<content::ProcessType>(data.process_type),
- /* exit_status */ base::TERMINATION_STATUS_MAX_ENUM,
- /* app_state */ base::android::APPLICATION_STATE_UNKNOWN);
+ OnChildExit(data.id, data.handle);
}
void CrashDumpManager::BrowserChildProcessCrashed(
const content::ChildProcessData& data,
int exit_code) {
- OnChildExit(data.id,
- data.handle,
- static_cast<content::ProcessType>(data.process_type),
- /* exit_status */ base::TERMINATION_STATUS_ABNORMAL_TERMINATION,
- /* app_state */ base::android::APPLICATION_STATE_UNKNOWN);
+ OnChildExit(data.id, data.handle);
}
void CrashDumpManager::Observe(int type,
@@ -184,14 +142,7 @@ void CrashDumpManager::Observe(int type,
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: {
content::RenderProcessHost* rph =
content::Source<content::RenderProcessHost>(source).ptr();
- content::RenderProcessHost::RendererClosedDetails* process_details =
- content::Details<content::RenderProcessHost::RendererClosedDetails>(
- details).ptr();
- OnChildExit(rph->GetID(),
- rph->GetHandle(),
- content::PROCESS_TYPE_RENDERER,
- process_details->status,
- base::android::ApplicationStatusListener::GetState());
+ OnChildExit(rph->GetID(), rph->GetHandle());
break;
}
default:
@@ -201,10 +152,7 @@ void CrashDumpManager::Observe(int type,
}
void CrashDumpManager::OnChildExit(int child_process_id,
- base::ProcessHandle pid,
- content::ProcessType process_type,
- base::TerminationStatus exit_status,
- base::android::ApplicationState app_state) {
+ base::ProcessHandle pid) {
base::FilePath minidump_path;
{
base::AutoLock auto_lock(child_process_id_to_minidump_path_lock_);
@@ -220,12 +168,7 @@ void CrashDumpManager::OnChildExit(int child_process_id,
}
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
- base::Bind(&CrashDumpManager::ProcessMinidump,
- minidump_path,
- pid,
- process_type,
- exit_status,
- app_state));
+ base::Bind(&CrashDumpManager::ProcessMinidump, minidump_path, pid));
}
} // namespace breakpad
« no previous file with comments | « components/crash/content/browser/crash_dump_manager_android.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698