This source file includes following definitions.
- SetUp
- GetLoadedModuleInfoSet
- ReportModule
#include "chrome/browser/install_verification/win/module_verification_test.h"
#include <Windows.h>
#include <vector>
#include "chrome/browser/install_verification/win/loaded_modules_snapshot.h"
#include "chrome/browser/install_verification/win/module_list.h"
std::set<size_t> ModuleVerificationTest::reported_module_ids_;
void ModuleVerificationTest::SetUp() {
reported_module_ids_.clear();
}
bool ModuleVerificationTest::GetLoadedModuleInfoSet(
std::set<ModuleInfo>* loaded_module_info_set) {
std::vector<HMODULE> snapshot;
if (!GetLoadedModulesSnapshot(&snapshot))
return false;
ModuleList::FromLoadedModuleSnapshot(snapshot)->GetModuleInfoSet(
loaded_module_info_set);
return true;
}
void ModuleVerificationTest::ReportModule(size_t module_id) {
reported_module_ids_.insert(module_id);
}