1 // Copyright 2016 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef IOS_CHROME_APP_APPLICATION_DELEGATE_STARTUP_INFORMATION_H_ 6 #define IOS_CHROME_APP_APPLICATION_DELEGATE_STARTUP_INFORMATION_H_ 7 8 @class CrashRestoreHelper; 9 class FirstUserActionRecorder; 10 11 namespace base { 12 class TimeTicks; 13 } 14 15 // Contains information about the startup. 16 @protocol StartupInformation<NSObject> 17 18 // Whether First Run UI (terms of service & sync sign-in) is being presented 19 // in a modal dialog. 20 @property(nonatomic, readonly) BOOL isPresentingFirstRunUI; 21 // Whether the current session began from a cold start. NO if the app has 22 // entered the background at least once since start up. 23 @property(nonatomic) BOOL isColdStart; 24 // Start of the application, used for UMA. 25 @property(nonatomic, assign) base::TimeTicks appLaunchTime; 26 // An object to record metrics related to the user's first action. 27 @property(nonatomic, readonly) FirstUserActionRecorder* firstUserActionRecorder; 28 29 // Keeps track of the restore state during startup. 30 @property(nonatomic, strong) CrashRestoreHelper* restoreHelper; 31 32 // Only for iOS 12 compat. 33 - (NSDictionary*)launchOptions; 34 35 // Disables the FirstUserActionRecorder. 36 - (void)resetFirstUserActionRecorder; 37 38 // Expire the FirstUserActionRecorder and disable it. 39 - (void)expireFirstUserActionRecorder; 40 41 // Expire the FirstUserActionRecorder and disable it after a delay. 42 - (void)expireFirstUserActionRecorderAfterDelay:(NSTimeInterval)delay; 43 44 // Enable the FirstUserActionRecorder with the time spent in background. 45 - (void)activateFirstUserActionRecorderWithBackgroundTime: 46 (NSTimeInterval)backgroundTime; 47 48 // Teardown that is needed by common Chrome code. This should not be called if 49 // Chrome code is still on the stack. 50 - (void)stopChromeMain; 51 52 @end 53 54 #endif // IOS_CHROME_APP_APPLICATION_DELEGATE_STARTUP_INFORMATION_H_ 55