OLD | NEW |
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 #ifndef CHROME_INSTALLER_UTIL_APP_COMMANDS_H_ | 5 #ifndef CHROME_INSTALLER_UTIL_APP_COMMANDS_H_ |
6 #define CHROME_INSTALLER_UTIL_APP_COMMANDS_H_ | 6 #define CHROME_INSTALLER_UTIL_APP_COMMANDS_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 18 matching lines...) Expand all Loading... |
29 typedef std::pair<CommandMap::const_iterator, CommandMap::const_iterator> | 29 typedef std::pair<CommandMap::const_iterator, CommandMap::const_iterator> |
30 CommandMapRange; | 30 CommandMapRange; |
31 | 31 |
32 AppCommands(); | 32 AppCommands(); |
33 ~AppCommands(); | 33 ~AppCommands(); |
34 | 34 |
35 // Initialize an instance from the set of commands in a given registry key | 35 // Initialize an instance from the set of commands in a given registry key |
36 // (typically the "Commands" subkey of a BrowserDistribution's "version key"). | 36 // (typically the "Commands" subkey of a BrowserDistribution's "version key"). |
37 // |key| must have been opened with at least | 37 // |key| must have been opened with at least |
38 // KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE access rights. | 38 // KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE access rights. |
39 bool Initialize(const base::win::RegKey& key); | 39 // |wow64access| must be one of 0, KEY_WOW64_32KEY or KEY_WOW64_64KEY and |
| 40 // must match the original WOW64 access used to open |key| previously. |
| 41 bool Initialize(const base::win::RegKey& key, REGSAM wow64access); |
40 | 42 |
41 // Replaces the contents of this object with that of |other|. | 43 // Replaces the contents of this object with that of |other|. |
42 AppCommands& CopyFrom(const AppCommands& other); | 44 AppCommands& CopyFrom(const AppCommands& other); |
43 | 45 |
44 // Clears this instance. | 46 // Clears this instance. |
45 void Clear(); | 47 void Clear(); |
46 | 48 |
47 // Retrieves the command identified by |command_id| from the set, copying it | 49 // Retrieves the command identified by |command_id| from the set, copying it |
48 // into |command| and returning true if present. | 50 // into |command| and returning true if present. |
49 bool Get(const std::wstring& command_id, AppCommand* command) const; | 51 bool Get(const std::wstring& command_id, AppCommand* command) const; |
(...skipping 13 matching lines...) Expand all Loading... |
63 | 65 |
64 protected: | 66 protected: |
65 CommandMap commands_; | 67 CommandMap commands_; |
66 | 68 |
67 DISALLOW_COPY_AND_ASSIGN(AppCommands); | 69 DISALLOW_COPY_AND_ASSIGN(AppCommands); |
68 }; | 70 }; |
69 | 71 |
70 } // namespace installer | 72 } // namespace installer |
71 | 73 |
72 #endif // CHROME_INSTALLER_UTIL_APP_COMMANDS_H_ | 74 #endif // CHROME_INSTALLER_UTIL_APP_COMMANDS_H_ |
OLD | NEW |