Chromium Code Reviews| Index: chrome/installer/test/resource_updater.h | 
| =================================================================== | 
| --- chrome/installer/test/resource_updater.h (revision 0) | 
| +++ chrome/installer/test/resource_updater.h (revision 0) | 
| @@ -0,0 +1,46 @@ | 
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +// A helper class for updating resources in portable executable files. | 
| + | 
| +#ifndef CHROME_INSTALLER_TEST_RESOURCE_UPDATER_H__ | 
| 
 
tommi (sloooow) - chröme
2010/11/19 20:14:38
_
 
grt (UTC plus 2)
2010/11/22 17:53:29
Done.
 
 | 
| +#define CHROME_INSTALLER_TEST_RESOURCE_UPDATER_H__ | 
| +#pragma once | 
| + | 
| +#include <windows.h> | 
| + | 
| +#include <string> | 
| +#include <utility> | 
| + | 
| +#include "base/basictypes.h" | 
| + | 
| +class FilePath; | 
| + | 
| +namespace upgrade_test { | 
| + | 
| +// Updates resources in a PE image file. | 
| +class ResourceUpdater { | 
| + public: | 
| + ResourceUpdater(); | 
| + ~ResourceUpdater(); | 
| + | 
| + // Loads |pe_image_path| in preparation for updating its resources. | 
| + bool Initialize(const FilePath& pe_image_path); | 
| 
 
tommi (sloooow) - chröme
2010/11/19 20:14:38
do you need to include file_path.h as well here?
 
grt (UTC plus 2)
2010/11/22 17:53:29
Style guide says "Don't use an #include when a for
 
 | 
| + | 
| + // Replaces the contents of the resource |name| of |type| and |language_id| | 
| + // with the contents of |input_file|, returning true on success. | 
| + bool Update(const std::wstring& name, const std::wstring& type, | 
| + WORD language_id, const FilePath& input_file); | 
| + | 
| + // Commits all updates to the file on disk. | 
| + bool Commit(); | 
| + | 
| + private: | 
| + HANDLE handle_; | 
| + DISALLOW_COPY_AND_ASSIGN(ResourceUpdater); | 
| +}; // class ResourceUpdater | 
| + | 
| +} // namespace upgrade_test | 
| + | 
| +#endif // CHROME_INSTALLER_TEST_RESOURCE_UPDATER_H__ | 
| Property changes on: chrome\installer\test\resource_updater.h | 
| ___________________________________________________________________ | 
| Added: svn:eol-style | 
| + LF |