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_IDS_H_ | 5 #ifndef CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_IDS_H_ |
6 #define CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_IDS_H_ | 6 #define CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_IDS_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include <map> | 10 #include <map> |
9 #include <string> | 11 #include <string> |
10 | 12 |
11 #include "base/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
12 | 14 |
13 typedef std::map<std::string, size_t> ModuleIDs; | 15 typedef std::map<std::string, size_t> ModuleIDs; |
14 | 16 |
15 // Parses a list of additional modules to verify. The data format is a series of | 17 // Parses a list of additional modules to verify. The data format is a series of |
16 // lines. Each line starts with a decimal ID, then a module name digest, | 18 // lines. Each line starts with a decimal ID, then a module name digest, |
17 // separated by a space. Lines are terminated by \r and/or \n. Invalid lines are | 19 // separated by a space. Lines are terminated by \r and/or \n. Invalid lines are |
18 // ignored. | 20 // ignored. |
19 // | 21 // |
20 // The result is a map of module name digests to module IDs. | 22 // The result is a map of module name digests to module IDs. |
21 void ParseAdditionalModuleIDs( | 23 void ParseAdditionalModuleIDs( |
22 const base::StringPiece& raw_data, | 24 const base::StringPiece& raw_data, |
23 ModuleIDs* module_ids); | 25 ModuleIDs* module_ids); |
24 | 26 |
25 // Loads standard module IDs and additional module IDs from a resource. | 27 // Loads standard module IDs and additional module IDs from a resource. |
26 void LoadModuleIDs(ModuleIDs* module_ids); | 28 void LoadModuleIDs(ModuleIDs* module_ids); |
27 | 29 |
28 #endif // CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_IDS_H_ | 30 #endif // CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_IDS_H_ |
OLD | NEW |