Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: chrome/installer/test/pe_image_resources.h

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // This file contains the interface for an iterator over a portable executable 5 // This file contains the interface for an iterator over a portable executable
6 // file's resources. 6 // file's resources.
7 7
8 #ifndef CHROME_INSTALLER_TEST_PE_IMAGE_RESOURCES_H_ 8 #ifndef CHROME_INSTALLER_TEST_PE_IMAGE_RESOURCES_H_
9 #define CHROME_INSTALLER_TEST_PE_IMAGE_RESOURCES_H_ 9 #define CHROME_INSTALLER_TEST_PE_IMAGE_RESOURCES_H_
10 10
11 #include <windows.h> 11 #include <windows.h>
12 #include <stddef.h>
13 #include <stdint.h>
12 14
13 #include <string> 15 #include <string>
14 #include <vector> 16 #include <vector>
15 17
16 #include "base/basictypes.h"
17 #include "base/logging.h" 18 #include "base/logging.h"
18 19
19 namespace base { namespace win { class PEImage; } } 20 namespace base { namespace win { class PEImage; } }
20 21
21 namespace upgrade_test { 22 namespace upgrade_test {
22 23
23 // A CopyConstructible and Assignable identifier for resource directory 24 // A CopyConstructible and Assignable identifier for resource directory
24 // entries. 25 // entries.
25 class EntryId { 26 class EntryId {
26 public: 27 public:
(...skipping 14 matching lines...) Expand all
41 typedef std::vector<EntryId> EntryPath; 42 typedef std::vector<EntryId> EntryPath;
42 43
43 // A callback function invoked once for each data entry in the image's 44 // A callback function invoked once for each data entry in the image's
44 // directory of resources. 45 // directory of resources.
45 // |path| - the full path of the data entry, 46 // |path| - the full path of the data entry,
46 // |data| - the address of the entry's data. 47 // |data| - the address of the entry's data.
47 // |size| - the size, in bytes, of the entry's data. 48 // |size| - the size, in bytes, of the entry's data.
48 // |code_page| - the code page to be used to interpret string data in the 49 // |code_page| - the code page to be used to interpret string data in the
49 // entry's data. 50 // entry's data.
50 // |context| - the context given to EnumResources. 51 // |context| - the context given to EnumResources.
51 typedef void (*EnumResource_Fn)(const EntryPath& path, uint8* data, 52 typedef void (*EnumResource_Fn)(const EntryPath& path,
52 DWORD size, DWORD code_page, uintptr_t context); 53 uint8_t* data,
54 DWORD size,
55 DWORD code_page,
56 uintptr_t context);
53 57
54 // Enumerates all data entries in |image|'s resource directory. |callback| is 58 // Enumerates all data entries in |image|'s resource directory. |callback| is
55 // invoked (and provided with |context|) once per entry. Returns false if 59 // invoked (and provided with |context|) once per entry. Returns false if
56 // some or all of the resource directory could not be parsed. 60 // some or all of the resource directory could not be parsed.
57 bool EnumResources(const base::win::PEImage& image, EnumResource_Fn callback, 61 bool EnumResources(const base::win::PEImage& image, EnumResource_Fn callback,
58 uintptr_t context); 62 uintptr_t context);
59 63
60 } // namespace upgrade_test 64 } // namespace upgrade_test
61 65
62 #endif // CHROME_INSTALLER_TEST_PE_IMAGE_RESOURCES_H_ 66 #endif // CHROME_INSTALLER_TEST_PE_IMAGE_RESOURCES_H_
OLDNEW
« no previous file with comments | « chrome/installer/test/alternate_version_generator_main.cc ('k') | chrome/installer/test/pe_image_resources.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698