def Set(self, flags):
    """Replaces all flags on the current command line with the flags given.

    Args:
      flags: A list of flags to set, eg. ['--single-process'].
    """
    if flags:
      assert flags[0] != 'chrome'

    self._current_flags = flags
    self._UpdateCommandLineFile()