function updateTabDiscardsInfoTableRow(row, info) {
    // Update the content.
    row.querySelector('.utility-rank-cell').textContent =
        info.utilityRank.toString();
    row.querySelector('.reactivation-score-cell').textContent =
        info.hasReactivationScore ? info.reactivationScore.toFixed(4) : 'N/A';
    row.querySelector('.favicon-div').style.backgroundImage =
        cr.icon.getFavicon(info.tabUrl);
    row.querySelector('.title-div').textContent = info.title;
    row.querySelector('.tab-url-cell').textContent = info.tabUrl;
    row.querySelector('.visibility-cell').textContent =
        visibilityToString(info.visibility);
    row.querySelector('.is-media-cell').textContent =
        boolToString(info.isMedia);
    row.querySelector('.is-frozen-cell').textContent =
        boolToString(info.isFrozen);
    row.querySelector('.is-discarded-cell').textContent =
        boolToString(info.isDiscarded);
    row.querySelector('.discard-count-cell').textContent =
        info.discardCount.toString();
    row.querySelector('.is-auto-discardable-div').textContent =
        boolToString(info.isAutoDiscardable);
    row.querySelector('.last-active-cell').textContent =
        lastActiveToString(info.lastActiveSeconds);

    // Enable/disable action links as appropriate.
    row.querySelector('.is-auto-discardable-link').removeAttribute('disabled');
    let discardLink = row.querySelector('.discard-link');
    let discardUrgentLink = row.querySelector('.discard-urgent-link');
    if (info.isDiscarded) {
      discardLink.setAttribute('disabled', '');
      discardUrgentLink.setAttribute('disabled', '');
    } else {
      discardLink.removeAttribute('disabled');
      discardUrgentLink.removeAttribute('disabled');
    }

    let freezeLink = row.querySelector('.freeze-link');
    if (info.isFrozen)
      freezeLink.setAttribute('disabled', '');
    else
      freezeLink.removeAttribute('disabled', '');
  }
/**
   * Updates a tab discards info table row in place. Sets/unsets 'disabled'
   * attributes on action-links as necessary, and populates all contents.
   */
Updates a tab discards info table row in place. Sets/unsets 'disabled'
attributes on action-links as necessary, and populates all contents.
Updates a tab discards info table row in place . Sets / unsets ' disabled ' attributes on action - links as necessary and populates all contents .
function updateTabDiscardsInfoTableRow(row, info) {
    row.querySelector('.utility-rank-cell').textContent =
        info.utilityRank.toString();
    row.querySelector('.reactivation-score-cell').textContent =
        info.hasReactivationScore ? info.reactivationScore.toFixed(4) : 'N/A';
    row.querySelector('.favicon-div').style.backgroundImage =
        cr.icon.getFavicon(info.tabUrl);
    row.querySelector('.title-div').textContent = info.title;
    row.querySelector('.tab-url-cell').textContent = info.tabUrl;
    row.querySelector('.visibility-cell').textContent =
        visibilityToString(info.visibility);
    row.querySelector('.is-media-cell').textContent =
        boolToString(info.isMedia);
    row.querySelector('.is-frozen-cell').textContent =
        boolToString(info.isFrozen);
    row.querySelector('.is-discarded-cell').textContent =
        boolToString(info.isDiscarded);
    row.querySelector('.discard-count-cell').textContent =
        info.discardCount.toString();
    row.querySelector('.is-auto-discardable-div').textContent =
        boolToString(info.isAutoDiscardable);
    row.querySelector('.last-active-cell').textContent =
        lastActiveToString(info.lastActiveSeconds);
    row.querySelector('.is-auto-discardable-link').removeAttribute('disabled');
    let discardLink = row.querySelector('.discard-link');
    let discardUrgentLink = row.querySelector('.discard-urgent-link');
    if (info.isDiscarded) {
      discardLink.setAttribute('disabled', '');
      discardUrgentLink.setAttribute('disabled', '');
    } else {
      discardLink.removeAttribute('disabled');
      discardUrgentLink.removeAttribute('disabled');
    }
    let freezeLink = row.querySelector('.freeze-link');
    if (info.isFrozen)
      freezeLink.setAttribute('disabled', '');
    else
      freezeLink.removeAttribute('disabled', '');
  }
function updateTabDiscardsInfoTableRow ( row , info ) { row . querySelector ( '.utility-rank-cell' ) . textContent = info . utilityRank . toString ( ) ; row . querySelector ( '.reactivation-score-cell' ) . textContent = info . hasReactivationScore ? info . reactivationScore . toFixed ( 4 ) : 'N/A' ; row . querySelector ( '.favicon-div' ) . style . backgroundImage = cr . icon . getFavicon ( info . tabUrl ) ; row . querySelector ( '.title-div' ) . textContent = info . title ; row . querySelector ( '.tab-url-cell' ) . textContent = info . tabUrl ; row . querySelector ( '.visibility-cell' ) . textContent = visibilityToString ( info . visibility ) ; row . querySelector ( '.is-media-cell' ) . textContent = boolToString ( info . isMedia ) ; row . querySelector ( '.is-frozen-cell' ) . textContent = boolToString ( info . isFrozen ) ; row . querySelector ( '.is-discarded-cell' ) . textContent = boolToString ( info . isDiscarded ) ; row . querySelector ( '.discard-count-cell' ) . textContent = info . discardCount . toString ( ) ; row . querySelector ( '.is-auto-discardable-div' ) . textContent = boolToString ( info . isAutoDiscardable ) ; row . querySelector ( '.last-active-cell' ) . textContent = lastActiveToString ( info . lastActiveSeconds ) ; row . querySelector ( '.is-auto-discardable-link' ) . removeAttribute ( 'disabled' ) ; let discardLink = row . querySelector ( '.discard-link' ) ; let discardUrgentLink = row . querySelector ( '.discard-urgent-link' ) ; if ( info . isDiscarded ) { discardLink . setAttribute ( 'disabled' , '' ) ; discardUrgentLink . setAttribute ( 'disabled' , '' ) ; } else { discardLink . removeAttribute ( 'disabled' ) ; discardUrgentLink . removeAttribute ( 'disabled' ) ; } let freezeLink = row . querySelector ( '.freeze-link' ) ; if ( info . isFrozen ) freezeLink . setAttribute ( 'disabled' , '' ) ; else freezeLink . removeAttribute ( 'disabled' , '' ) ; }
Updates a tab discards info table row in place.
Updates a tab discards info table row in place .
// Update the content. // Enable/disable action links as appropriate.