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

Side by Side Diff: courgette/patcher_x86_32.h

Issue 8417045: Last small bit of refactoring. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « courgette/patch_generator_x86_32.h ('k') | courgette/win32_x86_generator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 is the transformation for Windows X86 executables. 5 // This is the transformation for Windows X86 executables.
6 6
7 #ifndef COURGETTE_WIN32_X86_PATCHER_H_ 7 #ifndef COURGETTE_WIN32_X86_PATCHER_H_
8 #define COURGETTE_WIN32_X86_PATCHER_H_ 8 #define COURGETTE_WIN32_X86_PATCHER_H_
9 9
10 #include "courgette/ensemble.h" 10 #include "courgette/ensemble.h"
11 11
12 namespace courgette { 12 namespace courgette {
13 13
14 // CourgetteWin32X86Patcher is a TransformationPatcher for Windows 32-bit 14 // Courgette32X86Patcher is a TransformationPatcher for Windows 32-bit
15 // executables. 15 // executables.
16 // 16 //
17 class CourgetteWin32X86Patcher : public TransformationPatcher { 17 class PatcherX86_32 : public TransformationPatcher {
18 public: 18 public:
19 explicit CourgetteWin32X86Patcher(const Region& region) 19 explicit PatcherX86_32(const Region& region)
20 : ensemble_region_(region) { 20 : ensemble_region_(region) {
21 } 21 }
22 22
23 Status Init(SourceStream* parameter_stream) { 23 Status Init(SourceStream* parameter_stream) {
24 if (!parameter_stream->ReadVarint32(&base_offset_)) 24 if (!parameter_stream->ReadVarint32(&base_offset_))
25 return C_BAD_TRANSFORM; 25 return C_BAD_TRANSFORM;
26 if (!parameter_stream->ReadVarint32(&base_length_)) 26 if (!parameter_stream->ReadVarint32(&base_length_))
27 return C_BAD_TRANSFORM; 27 return C_BAD_TRANSFORM;
28 28
29 if (base_offset_ > ensemble_region_.length()) 29 if (base_offset_ > ensemble_region_.length())
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 return C_OK; 80 return C_OK;
81 } 81 }
82 82
83 private: 83 private:
84 Region ensemble_region_; 84 Region ensemble_region_;
85 85
86 uint32 base_offset_; 86 uint32 base_offset_;
87 uint32 base_length_; 87 uint32 base_length_;
88 88
89 DISALLOW_COPY_AND_ASSIGN(CourgetteWin32X86Patcher); 89 DISALLOW_COPY_AND_ASSIGN(PatcherX86_32);
90 }; 90 };
91 91
92 } // namespace 92 } // namespace
93 #endif // COURGETTE_WIN32_X86_PATCHER_H_ 93 #endif // COURGETTE_WIN32_X86_PATCHER_H_
OLDNEW
« no previous file with comments | « courgette/patch_generator_x86_32.h ('k') | courgette/win32_x86_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698