| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_VERIFICATION_COMMON_H_ | 5 #ifndef CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_VERIFICATION_COMMON_H_ |
| 6 #define CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_VERIFICATION_COMMON_H_ | 6 #define CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_VERIFICATION_COMMON_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 8 #include <set> | 10 #include <set> |
| 9 #include <string> | 11 #include <string> |
| 10 #include <vector> | 12 #include <vector> |
| 11 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 12 #include "chrome/browser/install_verification/win/module_ids.h" | 14 #include "chrome/browser/install_verification/win/module_ids.h" |
| 13 | 15 |
| 14 struct ModuleInfo; | 16 struct ModuleInfo; |
| 15 | 17 |
| 16 // Calculates a canonical digest for |module_name|. Ignores case and strips path | 18 // Calculates a canonical digest for |module_name|. Ignores case and strips path |
| 17 // information if present. | 19 // information if present. |
| 18 std::string CalculateModuleNameDigest(const base::string16& module_name); | 20 std::string CalculateModuleNameDigest(const base::string16& module_name); |
| 19 | 21 |
| 20 // Retrieves a ModuleInfo set representing all currenly loaded modules. Returns | 22 // Retrieves a ModuleInfo set representing all currenly loaded modules. Returns |
| 21 // false in case of failure. | 23 // false in case of failure. |
| 22 bool GetLoadedModules(std::set<ModuleInfo>* loaded_modules); | 24 bool GetLoadedModules(std::set<ModuleInfo>* loaded_modules); |
| 23 | 25 |
| 24 // Receives notification of a module verification result. | 26 // Receives notification of a module verification result. |
| 25 typedef void (ModuleVerificationDelegate)(size_t module_id); | 27 typedef void (ModuleVerificationDelegate)(size_t module_id); |
| 26 | 28 |
| 27 // For each module in |module_name_digests|, reports the associated ID from | 29 // For each module in |module_name_digests|, reports the associated ID from |
| 28 // |module_ids|, if any, to |delegate|. | 30 // |module_ids|, if any, to |delegate|. |
| 29 void ReportModuleMatches(const std::vector<std::string>& module_name_digests, | 31 void ReportModuleMatches(const std::vector<std::string>& module_name_digests, |
| 30 const ModuleIDs& module_ids, | 32 const ModuleIDs& module_ids, |
| 31 ModuleVerificationDelegate* delegate); | 33 ModuleVerificationDelegate* delegate); |
| 32 | 34 |
| 33 #endif // CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_VERIFICATION_COMMON_H_ | 35 #endif // CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_VERIFICATION_COMMON_H_ |
| OLD | NEW |