function updateUI(settings) {
  var disableUI = !settingIsControllable(settings.levelOfControl);
  document.getElementById('regularValue').disabled = disableUI;
  document.getElementById('useSeparateIncognitoSettings').disabled = disableUI;
  if (settings.hasOwnProperty('incognitoSpecific')) {
    var hasIncognitoValue = settings.incognitoSpecific;
    document.getElementById('useSeparateIncognitoSettings').checked =
        hasIncognitoValue;
    document.getElementById('incognitoValue').disabled =
        disableUI || !hasIncognitoValue;
    document.getElementById('incognitoValue').checked = settings.value;
  } else {
    document.getElementById('regularValue').checked = settings.value;
  }
}
Updates the UI to reflect the state of the preference.

@param settings{object} A settings object, as returned from |get()| or the
|onchange| event.