From c5fc1df3631f016cc609a2a022fea324a0f0e4bd Mon Sep 17 00:00:00 2001 From: "dgarrett@chromium.org" Date: Mon, 31 Oct 2011 22:09:40 +0000 Subject: Last small bit of refactoring. Move the Win32X86Generator and Patcher classes to non-windows specific names since they can be reused untouched for Elf. Move them from one file to files with matching names while at it. Store the transformation kind on the generator class so that it can be know if it's PE or Elf. Unified the TransformationId and ExecutableType enums into a single enum used everywhere (defined in courgette.h since it's now part of the external API). BUG=chromium-os:22149 TEST=Unittests Review URL: http://codereview.chromium.org/8417045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108019 0039d316-1c4b-4281-b951-d872f2087c98 --- courgette/ensemble.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'courgette/ensemble.h') diff --git a/courgette/ensemble.h b/courgette/ensemble.h index 4d26076..e538bd6 100644 --- a/courgette/ensemble.h +++ b/courgette/ensemble.h @@ -133,12 +133,6 @@ struct CourgettePatchFile { static const uint32 kMagic = 'C' | ('o' << 8) | ('u' << 16); static const uint32 kVersion = 20110216; - - // Transformation method IDs. These are embedded in generated files, so - // never remove or change an existing id. - enum TransformationMethodId { - T_COURGETTE_WIN32_X86 = 1, // Windows 32 bit 'Portable Executable' x86. - }; }; // For any transform you would implement both a TransformationPatcher and a @@ -208,7 +202,7 @@ class TransformationPatchGenerator { virtual ~TransformationPatchGenerator(); // Returns the TransformationMethodId that identies this transformation. - virtual CourgettePatchFile::TransformationMethodId Kind() = 0; + virtual ExecutableType Kind() = 0; // Writes the parameters that will be passed to TransformationPatcher::Init. virtual Status WriteInitialParameters(SinkStream* parameter_stream) = 0; -- cgit v1.1