Skip to content

Commit 436c398

Browse files
Boris SazonovChromium LUCI CQ
Boris Sazonov
authored and
Chromium LUCI CQ
committed
[M106][Android] Use CrashKeyString to tag FRE crashes
If Chrome is started and the FRE is not completed yet - tag crashes happening in this session with "first_run": "yes". This is consistent with iOS, where crashes from the first run are tagged with "first-run": "yes". This information is helpful to analyze stability of FRE-related launches and should give us more info about the flow that led to a crash. (cherry picked from commit da740b4) Bug: 1354558 Change-Id: Ia37f322f4b01d9b4e4bef34765c221bba96cf5bc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3841762 Commit-Queue: Boris Sazonov <bsazonov@chromium.org> Reviewed-by: Sam Maier <smaier@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#1037752} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3851321 Auto-Submit: Boris Sazonov <bsazonov@chromium.org> Commit-Queue: Sam Maier <smaier@chromium.org> Cr-Commit-Position: refs/branch-heads/5249@{#44} Cr-Branched-From: 4f7bea5-refs/heads/main@{#1036826}
1 parent 10208c7 commit 436c398

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
import org.chromium.chrome.browser.signin.services.IdentityServicesProvider;
3131
import org.chromium.chrome.browser.signin.services.SigninManager;
3232
import org.chromium.chrome.browser.vr.VrModuleProvider;
33+
import org.chromium.components.crash.CrashKeyIndex;
34+
import org.chromium.components.crash.CrashKeys;
3335
import org.chromium.components.embedder_support.util.UrlConstants;
3436
import org.chromium.components.signin.AccountManagerFacadeProvider;
3537
import org.chromium.components.signin.identitymanager.ConsentLevel;
@@ -282,6 +284,7 @@ public static boolean launch(Context caller, Intent fromIntent, boolean requires
282284
}
283285

284286
Log.d(TAG, "Redirecting user through FRE.");
287+
CrashKeys.getInstance().set(CrashKeyIndex.FIRST_RUN, "yes");
285288

286289
// Launch the async restriction checking as soon as we know we'll be running FRE.
287290
FirstRunAppRestrictionInfo.startInitializationHint();

components/crash/android/crash_keys_android.cc

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ JavaCrashKey& GetCrashKey(int index) {
2323
{"emulated_modules", JavaCrashKey::Tag::kArray},
2424
{"dynamic_module_dex_name", JavaCrashKey::Tag::kArray},
2525
{"partner_customization_config", JavaCrashKey::Tag::kArray},
26+
{"first_run", JavaCrashKey::Tag::kArray},
2627
};
2728
static_assert(
2829
std::size(crash_keys) == static_cast<size_t>(CrashKeyIndex::NUM_ENTRIES),

components/crash/android/crash_keys_android.h

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ enum class CrashKeyIndex {
1818
EMULATED_MODULES,
1919
DYNAMIC_MODULE_DEX_NAME,
2020
PARTNER_CUSTOMIZATION_CONFIG,
21+
FIRST_RUN,
2122
NUM_ENTRIES
2223
};
2324

components/crash/android/java/src/org/chromium/components/crash/CrashKeys.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
public class CrashKeys {
2626
private static final String[] KEYS = new String[] {"loaded_dynamic_module",
2727
"active_dynamic_module", "application_status", "installed_modules", "emulated_modules",
28-
"dynamic_module_dex_name", "partner_customization_config"};
28+
"dynamic_module_dex_name", "partner_customization_config", "first_run"};
2929

3030
private final AtomicReferenceArray<String> mValues = new AtomicReferenceArray<>(KEYS.length);
3131

0 commit comments

Comments
 (0)