

@flow.StateHandler(next_state='ParseFiles')
def Start(self):
    'Determine the Chrome directory.'
    self.state.Register('hist_count', 0)
    self.state.Register('history_paths', [])
    if self.state.args.history_path:
        self.state.history_paths.append(self.state.args.history_path)
    if (self.runner.output is not None):
        self.runner.output = aff4.FACTORY.Create(self.runner.output.urn, 'VFSAnalysisFile', token=self.token)
    if (not self.state.history_paths):
        self.state.history_paths = self.GuessHistoryPaths(self.state.args.username)
    if (not self.state.history_paths):
        raise flow.FlowError('Could not find valid History paths.')
    filenames = ['History']
    if self.state.args.get_archive:
        filenames.append('Archived History')
    for path in self.state.history_paths:
        for fname in filenames:
            self.CallFlow('FileFinder', paths=[os.path.join(path, fname)], pathtype=self.state.args.pathtype, action=file_finder.FileFinderAction(action_type=file_finder.FileFinderAction.Action.DOWNLOAD), next_state='ParseFiles')

dataset/ETHPy150Open google/grr/grr/lib/flows/general/webhistory.py ChromeHistory.Start/original