Home | History | Annotate | Download | only in win
      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.
      4 
      5 #ifndef CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_VERIFICATION_COMMON_H_
      6 #define CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_VERIFICATION_COMMON_H_
      7 
      8 #include <set>
      9 #include <string>
     10 #include <vector>
     11 #include "base/strings/string16.h"
     12 #include "chrome/browser/install_verification/win/module_ids.h"
     13 
     14 struct ModuleInfo;
     15 
     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);
     19 
     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);
     23 
     24 // Receives notification of a module verification result.
     25 typedef void (ModuleVerificationDelegate)(size_t module_id);
     26 
     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);
     32 
     33 #endif  // CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_VERIFICATION_COMMON_H_
     34