| Index: ios/chrome/browser/crash_loop_detection_util.mm
|
| diff --git a/ios/chrome/browser/crash_loop_detection_util.mm b/ios/chrome/browser/crash_loop_detection_util.mm
|
| index 2eb1913a59098e684fb53d01931759728096c5cf..0de92d6c2b1d2e615c3b6d55fc4d54c9d11d3284 100644
|
| --- a/ios/chrome/browser/crash_loop_detection_util.mm
|
| +++ b/ios/chrome/browser/crash_loop_detection_util.mm
|
| @@ -11,13 +11,13 @@
|
| #endif
|
|
|
| namespace {
|
| +static int startup_attempt_count = -1;
|
| NSString* const kAppStartupFailureCountKey = @"AppStartupFailureCount";
|
| }
|
|
|
| namespace crash_util {
|
|
|
| int GetFailedStartupAttemptCount() {
|
| - static int startup_attempt_count = -1;
|
| if (startup_attempt_count == -1) {
|
| NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
|
| startup_attempt_count = [defaults integerForKey:kAppStartupFailureCountKey];
|
| @@ -42,4 +42,9 @@ void ResetFailedStartupAttemptCount() {
|
| }
|
| }
|
|
|
| +void ResetFailedStartupAttemptCountForTests() {
|
| + ResetFailedStartupAttemptCount();
|
| + startup_attempt_count = -1;
|
| +}
|
| +
|
| } // namespace crash_util
|
|
|