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 #ifndef CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_VERIFICATION_COMMON_H_
6 #define CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_VERIFICATION_COMMON_H_
11 #include "base/strings/string16.h"
12 #include "chrome/browser/install_verification/win/module_ids.h"
16 // Calculates a canonical digest for |module_name|. Ignores case and strips path
17 // information if present.
18 std::string
CalculateModuleNameDigest(const base::string16
& module_name
);
20 // Retrieves a ModuleInfo set representing all currenly loaded modules. Returns
21 // false in case of failure.
22 bool GetLoadedModules(std::set
<ModuleInfo
>* loaded_modules
);
24 // Receives notification of a module verification result.
25 typedef void (ModuleVerificationDelegate
)(size_t module_id
);
27 // For each module in |module_name_digests|, reports the associated ID from
28 // |module_ids|, if any, to |delegate|.
29 void ReportModuleMatches(const std::vector
<std::string
>& module_name_digests
,
30 const ModuleIDs
& module_ids
,
31 ModuleVerificationDelegate
* delegate
);
33 #endif // CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_VERIFICATION_COMMON_H_