

def GuessHistoryPaths(self, username):
    'Take a user and return guessed full paths to History files.\n\n    Args:\n      username: Username as string.\n\n    Returns:\n      A list of strings containing paths to look for history files in.\n\n    Raises:\n      OSError: On invalid system in the Schema\n    '
    client = aff4.FACTORY.Open(self.client_id, token=self.token)
    system = client.Get(client.Schema.SYSTEM)
    user_info = flow_utils.GetUserInfo(client, username)
    if (not user_info):
        self.Error('Could not find homedir for user {0}'.format(username))
        return
    paths = []
    if (system == 'Windows'):
        path = '{app_data}\\{sw}\\User Data\\Default\\'
        for sw_path in ['Google\\Chrome', 'Chromium']:
            paths.append(path.format(app_data=user_info.special_folders.local_app_data, sw=sw_path))
    elif (system == 'Linux'):
        path = '{homedir}/.config/{sw}/Default/'
        for sw_path in ['google-chrome', 'chromium']:
            paths.append(path.format(homedir=user_info.homedir, sw=sw_path))
    elif (system == 'Darwin'):
        path = '{homedir}/Library/Application Support/{sw}/Default/'
        for sw_path in ['Google/Chrome', 'Chromium']:
            paths.append(path.format(homedir=user_info.homedir, sw=sw_path))
    else:
        raise OSError('Invalid OS for Chrome History')
    return paths

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