OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 COURGETTE_WIN32_X86_PATCHER_H_ | 5 #ifndef COURGETTE_WIN32_X86_PATCHER_H_ |
6 #define COURGETTE_WIN32_X86_PATCHER_H_ | 6 #define COURGETTE_WIN32_X86_PATCHER_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include "base/macros.h" |
8 #include "courgette/ensemble.h" | 11 #include "courgette/ensemble.h" |
9 | 12 |
10 namespace courgette { | 13 namespace courgette { |
11 | 14 |
12 // PatcherX86_32 is the universal patcher for all executables. The executable | 15 // PatcherX86_32 is the universal patcher for all executables. The executable |
13 // type is determined by ParseDetectedExecutable function. | 16 // type is determined by ParseDetectedExecutable function. |
14 // | 17 // |
15 class PatcherX86_32 : public TransformationPatcher { | 18 class PatcherX86_32 : public TransformationPatcher { |
16 public: | 19 public: |
17 explicit PatcherX86_32(const Region& region) | 20 explicit PatcherX86_32(const Region& region) |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 DeleteEncodedProgram(encoded_program); | 86 DeleteEncodedProgram(encoded_program); |
84 if (status != C_OK) | 87 if (status != C_OK) |
85 return status; | 88 return status; |
86 | 89 |
87 return C_OK; | 90 return C_OK; |
88 } | 91 } |
89 | 92 |
90 private: | 93 private: |
91 Region ensemble_region_; | 94 Region ensemble_region_; |
92 | 95 |
93 uint32 base_offset_; | 96 uint32_t base_offset_; |
94 uint32 base_length_; | 97 uint32_t base_length_; |
95 | 98 |
96 DISALLOW_COPY_AND_ASSIGN(PatcherX86_32); | 99 DISALLOW_COPY_AND_ASSIGN(PatcherX86_32); |
97 }; | 100 }; |
98 | 101 |
99 } // namespace | 102 } // namespace |
100 #endif // COURGETTE_WIN32_X86_PATCHER_H_ | 103 #endif // COURGETTE_WIN32_X86_PATCHER_H_ |
OLD | NEW |