code: function checkForExtensionsUpdate() {
          var lastExtensionRegistryCheckTime = PreferencesManager.getViewState("lastExtensionRegistryCheckTime"),
              timeOfNextCheck = lastExtensionRegistryCheckTime + ONE_DAY,
              currentTime = (new Date()).getTime();
  
          // update icon according to previously saved information
          var availableUpdates = PreferencesManager.getViewState("extensionUpdateInfo");
          availableUpdates = ExtensionManager.cleanAvailableUpdates(availableUpdates);
          $("#toolbar-extension-manager").toggleClass("updatesAvailable", availableUpdates.length > 0);
  
          if (availableUpdates.length === 0) {
              // icon is gray, no updates available
              if (currentTime > timeOfNextCheck) {
                  // downloadRegistry, will be resolved in _onRegistryDownloaded
                  ExtensionManager.downloadRegistry().done(function () {
                      // schedule another check in 24 hours + 2 minutes
                      setTimeout(checkForExtensionsUpdate, ONE_DAY + TWO_MINUTES);
                  });
              } else {
                  // schedule the download of the registry in appropriate time
                  setTimeout(checkForExtensionsUpdate, (timeOfNextCheck - currentTime) + TWO_MINUTES);
              }
          }
      }
docs: Every 24 hours downloads registry information to check for update, but only if the registry download
  wasn't triggered by another action (like opening extension manager)
  If there isn't 24 hours elapsed from the last download, use cached information from last download
  to determine state of the update notification.