src/extensions/default/AutoUpdate/main.js
function attemptToDownload() {
        if (checkIfOnline()) {
            postMessageToNode(MessageIds.PERFORM_CLEANUP, ['.json'], true);
        } else {
            enableCheckForUpdateEntry(true);
            UpdateStatus.cleanUpdateStatus();
            HealthLogger.sendAnalyticsData(
                autoUpdateEventNames.AUTOUPDATE_DOWNLOAD_FAILED,
                "autoUpdate",
                "download",
                "fail",
                "No Internet connection available."
            );
            UpdateInfoBar.showUpdateBar({
                type: "warning",
                title: Strings.DOWNLOAD_FAILED,
                description: Strings.INTERNET_UNAVAILABLE
            });

            setUpdateStateInJSON("autoUpdateInProgress", false);
        }
    }
function attemptToDownload() {
        if (checkIfOnline()) {
            postMessageToNode(MessageIds.PERFORM_CLEANUP, ['.json'], true);
        } else {
            enableCheckForUpdateEntry(true);
            UpdateStatus.cleanUpdateStatus();
            HealthLogger.sendAnalyticsData(
                autoUpdateEventNames.AUTOUPDATE_DOWNLOAD_FAILED,
                "autoUpdate",
                "download",
                "fail",
                "No Internet connection available."
            );
            UpdateInfoBar.showUpdateBar({
                type: "warning",
                title: Strings.DOWNLOAD_FAILED,
                description: Strings.INTERNET_UNAVAILABLE
            });

            setUpdateStateInJSON("autoUpdateInProgress", false);
        }
    }
function attemptToDownload ( ) { if ( checkIfOnline ( ) ) { postMessageToNode ( MessageIds . PERFORM_CLEANUP , [ '.json' ] , true ) ; } else { enableCheckForUpdateEntry ( true ) ; UpdateStatus . cleanUpdateStatus ( ) ; HealthLogger . sendAnalyticsData ( autoUpdateEventNames . AUTOUPDATE_DOWNLOAD_FAILED , "autoUpdate" , "download" , "fail" , "No Internet connection available." ) ; UpdateInfoBar . showUpdateBar ( { type : "warning" , title : Strings . DOWNLOAD_FAILED , description : Strings . INTERNET_UNAVAILABLE } ) ; setUpdateStateInJSON ( "autoUpdateInProgress" , false ) ; } }
Attempts a download of the latest installer, while cleaning up any existing downloaded installers
Attempts a download of the latest installer while cleaning up any existing downloaded installers