1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/install_verification/win/install_verification.h"
10 #include "base/metrics/sparse_histogram.h"
11 #include "chrome/browser/install_verification/win/imported_module_verification.h"
12 #include "chrome/browser/install_verification/win/loaded_module_verification.h"
13 #include "chrome/browser/install_verification/win/module_ids.h"
14 #include "chrome/browser/install_verification/win/module_info.h"
15 #include "chrome/browser/install_verification/win/module_verification_common.h"
19 void ReportModuleMatch(size_t module_id
) {
20 UMA_HISTOGRAM_SPARSE_SLOWLY("InstallVerifier.ModuleMatch", module_id
);
23 void ReportImport(size_t module_id
) {
24 UMA_HISTOGRAM_SPARSE_SLOWLY("InstallVerifier.ModuleImport", module_id
);
29 void VerifyInstallation() {
31 LoadModuleIDs(&module_ids
);
32 std::set
<ModuleInfo
> loaded_modules
;
33 if (GetLoadedModules(&loaded_modules
)) {
34 VerifyLoadedModules(loaded_modules
, module_ids
, &ReportModuleMatch
);
35 VerifyImportedModules(loaded_modules
, module_ids
, &ReportImport
);