blob: fe736955c728dd1439942c9abd36b15bdf4fd729 [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <set>
#include "base/files/file_path.h"
#include "base/strings/string16.h"
#include "chrome/browser/profiles/profile.h"
namespace safe_browsing {
// Represents scanner results sent by the Chrome Cleanup tool via the Chrome
// Prompt IPC, that needs to be propaged to visualization components.
class ChromeCleanerScannerResults {
using FileCollection = std::set<base::FilePath>;
using RegistryKeyCollection = std::set<base::string16>;
using ExtensionCollection = std::set<base::string16>;
ChromeCleanerScannerResults(const FileCollection& files_to_delete,
const RegistryKeyCollection& registry_keys,
const ExtensionCollection& extension_ids);
ChromeCleanerScannerResults(const ChromeCleanerScannerResults& other);
ChromeCleanerScannerResults& operator=(
const ChromeCleanerScannerResults& other);
// Retrieves the extension names of |extension_ids_| using the extension
// registry from |profile|. If a name cannot be found for an extension ID, a
// translated string is added stating that it is an unknown ID.
void FetchExtensionNames(Profile* profile,
ExtensionCollection* extension_names) const;
const FileCollection& files_to_delete() const { return files_to_delete_; }
const RegistryKeyCollection& registry_keys() const { return registry_keys_; }
const ExtensionCollection& extension_ids() const { return extension_ids_; }
FileCollection files_to_delete_;
RegistryKeyCollection registry_keys_;
ExtensionCollection extension_ids_;
} // namespace safe_browsing