Chromium Code Reviews
|
| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // A helper class for updating resources in portable executable files. | |
| 6 | |
| 7 #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.
| |
| 8 #define CHROME_INSTALLER_TEST_RESOURCE_UPDATER_H__ | |
| 9 #pragma once | |
| 10 | |
| 11 #include <windows.h> | |
| 12 | |
| 13 #include <string> | |
| 14 #include <utility> | |
| 15 | |
| 16 #include "base/basictypes.h" | |
| 17 | |
| 18 class FilePath; | |
| 19 | |
| 20 namespace upgrade_test { | |
| 21 | |
| 22 // Updates resources in a PE image file. | |
| 23 class ResourceUpdater { | |
| 24 public: | |
| 25 ResourceUpdater(); | |
| 26 ~ResourceUpdater(); | |
| 27 | |
| 28 // Loads |pe_image_path| in preparation for updating its resources. | |
| 29 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
| |
| 30 | |
| 31 // Replaces the contents of the resource |name| of |type| and |language_id| | |
| 32 // with the contents of |input_file|, returning true on success. | |
| 33 bool Update(const std::wstring& name, const std::wstring& type, | |
| 34 WORD language_id, const FilePath& input_file); | |
| 35 | |
| 36 // Commits all updates to the file on disk. | |
| 37 bool Commit(); | |
| 38 | |
| 39 private: | |
| 40 HANDLE handle_; | |
| 41 DISALLOW_COPY_AND_ASSIGN(ResourceUpdater); | |
| 42 }; // class ResourceUpdater | |
| 43 | |
| 44 } // namespace upgrade_test | |
| 45 | |
| 46 #endif // CHROME_INSTALLER_TEST_RESOURCE_UPDATER_H__ | |
| OLD | NEW |