'Mark this KeyRangeItem as success, updating the progress database.
Process will split this KeyRangeItem based on the content of
download_result and adds the unfinished ranges to the work queue.
Args:
download_result: A DownloadResult instance.
thread_pool: An AdaptiveThreadPool instance.
batch_size: The number of entities to transfer per request.
new_state: The state to transition the completed range to.'

def Process(self, download_result, thread_pool, batch_size, new_state=STATE_GOT):

    self._AssertInState(STATE_GETTING)
    self._AssertProgressKey()
    self.download_result = download_result
    self.count = len(download_result.keys)
    if download_result.continued:
        self._FinishedRange()._StateTransition(new_state, blocking=True)
        self._AddUnfinishedRanges(thread_pool, batch_size)
    else:
        self._StateTransition(new_state, blocking=True)
