src/extensions/default/AutoUpdate/main.js
function () {

                // Restart button click handler
                var restartBtnClicked = function () {
                    HealthLogger.sendAnalyticsData(
                        autoUpdateEventNames.AUTOUPDATE_DOWNLOAD_COMPLETE_USER_CLICK_RESTART,
                        "autoUpdate",
                        "installNotification",
                        "installNow ",
                        "click"
                    );
                    detachUpdateBarBtnHandlers();
                    initiateUpdateProcess(statusObj.installerPath, statusObj.logFilePath, statusObj.installStatusFilePath);
                };

                // Later button click handler
                var laterBtnClicked = function () {
                    HealthLogger.sendAnalyticsData(
                        autoUpdateEventNames.AUTOUPDATE_DOWNLOAD_COMPLETE_USER_CLICK_LATER,
                        "autoUpdate",
                        "installNotification",
                        "cancel",
                        "click"
                    );
                    detachUpdateBarBtnHandlers();
                    setUpdateStateInJSON('updateInitiatedInPrevSession', false);
                };

                //attaching UpdateBar handlers
                UpdateInfoBar.on(UpdateInfoBar.RESTART_BTN_CLICKED, restartBtnClicked);
                UpdateInfoBar.on(UpdateInfoBar.LATER_BTN_CLICKED, laterBtnClicked);

                UpdateInfoBar.showUpdateBar({
                    title: Strings.DOWNLOAD_COMPLETE,
                    description: Strings.CLICK_RESTART_TO_UPDATE,
                    needButtons: true
                });

                setUpdateStateInJSON("autoUpdateInProgress", false);
                HealthLogger.sendAnalyticsData(
                    autoUpdateEventNames.AUTOUPDATE_DOWNLOADCOMPLETE_UPDATE_BAR_RENDERED,
                    "autoUpdate",
                    "installNotification",
                    "render",
                    ""
                );
            }
function () {

                // Restart button click handler
                var restartBtnClicked = function () {
                    HealthLogger.sendAnalyticsData(
                        autoUpdateEventNames.AUTOUPDATE_DOWNLOAD_COMPLETE_USER_CLICK_RESTART,
                        "autoUpdate",
                        "installNotification",
                        "installNow ",
                        "click"
                    );
                    detachUpdateBarBtnHandlers();
                    initiateUpdateProcess(statusObj.installerPath, statusObj.logFilePath, statusObj.installStatusFilePath);
                };

                // Later button click handler
                var laterBtnClicked = function () {
                    HealthLogger.sendAnalyticsData(
                        autoUpdateEventNames.AUTOUPDATE_DOWNLOAD_COMPLETE_USER_CLICK_LATER,
                        "autoUpdate",
                        "installNotification",
                        "cancel",
                        "click"
                    );
                    detachUpdateBarBtnHandlers();
                    setUpdateStateInJSON('updateInitiatedInPrevSession', false);
                };

                //attaching UpdateBar handlers
                UpdateInfoBar.on(UpdateInfoBar.RESTART_BTN_CLICKED, restartBtnClicked);
                UpdateInfoBar.on(UpdateInfoBar.LATER_BTN_CLICKED, laterBtnClicked);

                UpdateInfoBar.showUpdateBar({
                    title: Strings.DOWNLOAD_COMPLETE,
                    description: Strings.CLICK_RESTART_TO_UPDATE,
                    needButtons: true
                });

                setUpdateStateInJSON("autoUpdateInProgress", false);
                HealthLogger.sendAnalyticsData(
                    autoUpdateEventNames.AUTOUPDATE_DOWNLOADCOMPLETE_UPDATE_BAR_RENDERED,
                    "autoUpdate",
                    "installNotification",
                    "render",
                    ""
                );
            }
function ( ) { // Restart button click handler var restartBtnClicked = function ( ) { HealthLogger . sendAnalyticsData ( autoUpdateEventNames . AUTOUPDATE_DOWNLOAD_COMPLETE_USER_CLICK_RESTART , "autoUpdate" , "installNotification" , "installNow " , "click" ) ; detachUpdateBarBtnHandlers ( ) ; initiateUpdateProcess ( statusObj . installerPath , statusObj . logFilePath , statusObj . installStatusFilePath ) ; } ; // Later button click handler var laterBtnClicked = function ( ) { HealthLogger . sendAnalyticsData ( autoUpdateEventNames . AUTOUPDATE_DOWNLOAD_COMPLETE_USER_CLICK_LATER , "autoUpdate" , "installNotification" , "cancel" , "click" ) ; detachUpdateBarBtnHandlers ( ) ; setUpdateStateInJSON ( 'updateInitiatedInPrevSession' , false ) ; } ; //attaching UpdateBar handlers UpdateInfoBar . on ( UpdateInfoBar . RESTART_BTN_CLICKED , restartBtnClicked ) ; UpdateInfoBar . on ( UpdateInfoBar . LATER_BTN_CLICKED , laterBtnClicked ) ; UpdateInfoBar . showUpdateBar ( { title : Strings . DOWNLOAD_COMPLETE , description : Strings . CLICK_RESTART_TO_UPDATE , needButtons : true } ) ; setUpdateStateInJSON ( "autoUpdateInProgress" , false ) ; HealthLogger . sendAnalyticsData ( autoUpdateEventNames . AUTOUPDATE_DOWNLOADCOMPLETE_UPDATE_BAR_RENDERED , "autoUpdate" , "installNotification" , "render" , "" ) ; }
Installer is validated successfully
Installer is validated successfully