Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / install_verification / win / install_verification.cc
blobc113dd2f0c3f41f66faf5eaa04a3a923288f4edd
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"
7 #include <set>
8 #include <vector>
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"
17 namespace {
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);
27 } // namespace
29 void VerifyInstallation() {
30 ModuleIDs module_ids;
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);