Commit 61d80b31 authored by ssid's avatar ssid Committed by Commit bot

Background Tracing: Remove safety check for crash exit on Android

On Android the exit status is always marked as EXIT_CRASHED. So, the
background traces are never uploaded. Since the check is useful only for
preemptive mode, this CL removes this check for REACTIVE triggers on
Android and adds extra check for preemptive trigger in that place.

BUG=613198

Review-Url: https://codereview.chromium.org/2192093002
Cr-Commit-Position: refs/heads/master@{#408771}
parent 698c9818
......@@ -84,10 +84,17 @@ bool ProfileAllowsScenario(const content::BackgroundTracingConfig& config,
return true;
}
#if !defined(OS_ANDROID)
// Safeguard, in case background tracing is responsible for a crash on
// startup.
if (profile->GetLastSessionExitType() == Profile::EXIT_CRASHED)
return false;
#else
// In case of Android the exit state is always set as EXIT_CRASHED. So,
// preemptive mode cannot be used safely.
if (config.tracing_mode() == content::BackgroundTracingConfig::PREEMPTIVE)
return false;
#endif
PrefService* local_state = g_browser_process->local_state();
DCHECK(local_state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment