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

Side by Side Diff: chrome/installer/test/resource_updater.h

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months 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 | « chrome/installer/test/resource_loader.h ('k') | chrome/installer/util/auto_launch_util.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) 2010 The Chromium Authors. All rights reserved. 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 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 // A helper class for updating resources in portable executable files. 5 // A helper class for updating resources in portable executable files.
6 6
7 #ifndef CHROME_INSTALLER_TEST_RESOURCE_UPDATER_H_ 7 #ifndef CHROME_INSTALLER_TEST_RESOURCE_UPDATER_H_
8 #define CHROME_INSTALLER_TEST_RESOURCE_UPDATER_H_ 8 #define CHROME_INSTALLER_TEST_RESOURCE_UPDATER_H_
9 9
10 #include <windows.h> 10 #include <windows.h>
11 11
12 #include <string> 12 #include <string>
13 #include <utility> 13 #include <utility>
14 14
15 #include "base/basictypes.h" 15 #include "base/basictypes.h"
16 16
17 namespace base {
17 class FilePath; 18 class FilePath;
19 }
18 20
19 namespace upgrade_test { 21 namespace upgrade_test {
20 22
21 // Updates resources in a PE image file. 23 // Updates resources in a PE image file.
22 class ResourceUpdater { 24 class ResourceUpdater {
23 public: 25 public:
24 ResourceUpdater(); 26 ResourceUpdater();
25 ~ResourceUpdater(); 27 ~ResourceUpdater();
26 28
27 // Loads |pe_image_path| in preparation for updating its resources. 29 // Loads |pe_image_path| in preparation for updating its resources.
28 bool Initialize(const FilePath& pe_image_path); 30 bool Initialize(const base::FilePath& pe_image_path);
29 31
30 // Replaces the contents of the resource |name| of |type| and |language_id| 32 // Replaces the contents of the resource |name| of |type| and |language_id|
31 // with the contents of |input_file|, returning true on success. 33 // with the contents of |input_file|, returning true on success.
32 bool Update(const std::wstring& name, const std::wstring& type, 34 bool Update(const std::wstring& name, const std::wstring& type,
33 WORD language_id, const FilePath& input_file); 35 WORD language_id, const base::FilePath& input_file);
34 36
35 // Commits all updates to the file on disk. 37 // Commits all updates to the file on disk.
36 bool Commit(); 38 bool Commit();
37 39
38 private: 40 private:
39 HANDLE handle_; 41 HANDLE handle_;
40 DISALLOW_COPY_AND_ASSIGN(ResourceUpdater); 42 DISALLOW_COPY_AND_ASSIGN(ResourceUpdater);
41 }; // class ResourceUpdater 43 }; // class ResourceUpdater
42 44
43 } // namespace upgrade_test 45 } // namespace upgrade_test
44 46
45 #endif // CHROME_INSTALLER_TEST_RESOURCE_UPDATER_H_ 47 #endif // CHROME_INSTALLER_TEST_RESOURCE_UPDATER_H_
OLDNEW
« no previous file with comments | « chrome/installer/test/resource_loader.h ('k') | chrome/installer/util/auto_launch_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698