This source file includes following definitions.
- ReportModuleMatch
- ReportImport
- VerifyInstallation
#include "chrome/browser/install_verification/win/install_verification.h"
#include <set>
#include <vector>
#include "base/metrics/sparse_histogram.h"
#include "chrome/browser/install_verification/win/imported_module_verification.h"
#include "chrome/browser/install_verification/win/loaded_module_verification.h"
#include "chrome/browser/install_verification/win/module_ids.h"
#include "chrome/browser/install_verification/win/module_info.h"
#include "chrome/browser/install_verification/win/module_verification_common.h"
namespace {
void ReportModuleMatch(size_t module_id) {
UMA_HISTOGRAM_SPARSE_SLOWLY("InstallVerifier.ModuleMatch", module_id);
}
void ReportImport(size_t module_id) {
UMA_HISTOGRAM_SPARSE_SLOWLY("InstallVerifier.ModuleImport", module_id);
}
}
void VerifyInstallation() {
ModuleIDs module_ids;
LoadModuleIDs(&module_ids);
std::set<ModuleInfo> loaded_modules;
if (GetLoadedModules(&loaded_modules)) {
VerifyLoadedModules(loaded_modules, module_ids, &ReportModuleMatch);
VerifyImportedModules(loaded_modules, module_ids, &ReportImport);
}
}