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_WORK_ITEM_LIST_H_ | 5 #ifndef CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ |
6 #define CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ | 6 #define CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 29 matching lines...) Expand all Loading... | |
40 virtual void AddWorkItem(WorkItem* work_item); | 40 virtual void AddWorkItem(WorkItem* work_item); |
41 | 41 |
42 // Add a CallbackWorkItem that invokes a callback. | 42 // Add a CallbackWorkItem that invokes a callback. |
43 virtual WorkItem* AddCallbackWorkItem( | 43 virtual WorkItem* AddCallbackWorkItem( |
44 base::Callback<bool(const CallbackWorkItem&)> callback); | 44 base::Callback<bool(const CallbackWorkItem&)> callback); |
45 | 45 |
46 // Add a CopyRegKeyWorkItem that recursively copies a given registry key. | 46 // Add a CopyRegKeyWorkItem that recursively copies a given registry key. |
47 virtual WorkItem* AddCopyRegKeyWorkItem(HKEY predefined_root, | 47 virtual WorkItem* AddCopyRegKeyWorkItem(HKEY predefined_root, |
48 const std::wstring& source_key_path, | 48 const std::wstring& source_key_path, |
49 const std::wstring& dest_key_path, | 49 const std::wstring& dest_key_path, |
50 CopyOverWriteOption overwrite_option); | 50 CopyOverWriteOption overwrite_option, |
51 RegWow64ViewOption reg_wow64_option); | |
grt (UTC plus 2)
2014/05/16 18:26:11
it looks like it's going to be pretty intrusive to
| |
51 | 52 |
52 // Add a CopyTreeWorkItem to the list of work items. | 53 // Add a CopyTreeWorkItem to the list of work items. |
53 // See the NOTE in the documentation for the CopyTreeWorkItem class for | 54 // See the NOTE in the documentation for the CopyTreeWorkItem class for |
54 // special considerations regarding |temp_dir|. | 55 // special considerations regarding |temp_dir|. |
55 virtual WorkItem* AddCopyTreeWorkItem( | 56 virtual WorkItem* AddCopyTreeWorkItem( |
56 const std::wstring& source_path, | 57 const std::wstring& source_path, |
57 const std::wstring& dest_path, | 58 const std::wstring& dest_path, |
58 const std::wstring& temp_dir, | 59 const std::wstring& temp_dir, |
59 CopyOverWriteOption overwrite_option, | 60 CopyOverWriteOption overwrite_option, |
60 const std::wstring& alternative_path = L""); | 61 const std::wstring& alternative_path = L""); |
61 | 62 |
62 // Add a CreateDirWorkItem that creates a directory at the given path. | 63 // Add a CreateDirWorkItem that creates a directory at the given path. |
63 virtual WorkItem* AddCreateDirWorkItem(const base::FilePath& path); | 64 virtual WorkItem* AddCreateDirWorkItem(const base::FilePath& path); |
64 | 65 |
65 // Add a CreateRegKeyWorkItem that creates a registry key at the given | 66 // Add a CreateRegKeyWorkItem that creates a registry key at the given |
66 // path. | 67 // path. |
67 virtual WorkItem* AddCreateRegKeyWorkItem(HKEY predefined_root, | 68 virtual WorkItem* AddCreateRegKeyWorkItem( |
68 const std::wstring& path); | 69 HKEY predefined_root, |
70 const std::wstring& path, | |
71 RegWow64ViewOption reg_wow64_option); | |
69 | 72 |
70 // Add a DeleteRegKeyWorkItem that deletes a registry key from the given | 73 // Add a DeleteRegKeyWorkItem that deletes a registry key from the given |
71 // path. | 74 // path. |
72 virtual WorkItem* AddDeleteRegKeyWorkItem(HKEY predefined_root, | 75 virtual WorkItem* AddDeleteRegKeyWorkItem( |
73 const std::wstring& path); | 76 HKEY predefined_root, |
77 const std::wstring& path, | |
78 RegWow64ViewOption reg_wow64_option); | |
74 | 79 |
75 // Add a DeleteRegValueWorkItem that deletes registry value of type REG_SZ | 80 // Add a DeleteRegValueWorkItem that deletes registry value of type REG_SZ |
76 // or REG_DWORD. | 81 // or REG_DWORD. |
77 virtual WorkItem* AddDeleteRegValueWorkItem(HKEY predefined_root, | 82 virtual WorkItem* AddDeleteRegValueWorkItem( |
78 const std::wstring& key_path, | 83 HKEY predefined_root, |
79 const std::wstring& value_name); | 84 const std::wstring& key_path, |
85 const std::wstring& value_name, | |
86 RegWow64ViewOption reg_wow64_option); | |
80 | 87 |
81 // Add a DeleteTreeWorkItem that recursively deletes a file system | 88 // Add a DeleteTreeWorkItem that recursively deletes a file system |
82 // hierarchy at the given root path. A key file can be optionally specified | 89 // hierarchy at the given root path. A key file can be optionally specified |
83 // by key_path. | 90 // by key_path. |
84 virtual WorkItem* AddDeleteTreeWorkItem( | 91 virtual WorkItem* AddDeleteTreeWorkItem( |
85 const base::FilePath& root_path, | 92 const base::FilePath& root_path, |
86 const base::FilePath& temp_path, | 93 const base::FilePath& temp_path, |
87 const std::vector<base::FilePath>& key_paths); | 94 const std::vector<base::FilePath>& key_paths); |
88 | 95 |
89 // Same as above but without support for key files. | 96 // Same as above but without support for key files. |
90 virtual WorkItem* AddDeleteTreeWorkItem(const base::FilePath& root_path, | 97 virtual WorkItem* AddDeleteTreeWorkItem(const base::FilePath& root_path, |
91 const base::FilePath& temp_path); | 98 const base::FilePath& temp_path); |
92 | 99 |
93 // Add a MoveTreeWorkItem to the list of work items. | 100 // Add a MoveTreeWorkItem to the list of work items. |
94 virtual WorkItem* AddMoveTreeWorkItem(const std::wstring& source_path, | 101 virtual WorkItem* AddMoveTreeWorkItem(const std::wstring& source_path, |
95 const std::wstring& dest_path, | 102 const std::wstring& dest_path, |
96 const std::wstring& temp_dir, | 103 const std::wstring& temp_dir, |
97 MoveTreeOption duplicate_option); | 104 MoveTreeOption duplicate_option); |
98 | 105 |
99 // Add a SetRegValueWorkItem that sets a registry value with REG_SZ type | 106 // Add a SetRegValueWorkItem that sets a registry value with REG_SZ type |
100 // at the key with specified path. | 107 // at the key with specified path. |
101 virtual WorkItem* AddSetRegValueWorkItem(HKEY predefined_root, | 108 virtual WorkItem* AddSetRegValueWorkItem(HKEY predefined_root, |
102 const std::wstring& key_path, | 109 const std::wstring& key_path, |
103 const std::wstring& value_name, | 110 const std::wstring& value_name, |
104 const std::wstring& value_data, | 111 const std::wstring& value_data, |
105 bool overwrite); | 112 bool overwrite, |
113 RegWow64ViewOption reg_wow64_option); | |
106 | 114 |
107 // Add a SetRegValueWorkItem that sets a registry value with REG_DWORD type | 115 // Add a SetRegValueWorkItem that sets a registry value with REG_DWORD type |
108 // at the key with specified path. | 116 // at the key with specified path. |
109 virtual WorkItem* AddSetRegValueWorkItem(HKEY predefined_root, | 117 virtual WorkItem* AddSetRegValueWorkItem(HKEY predefined_root, |
110 const std::wstring& key_path, | 118 const std::wstring& key_path, |
111 const std::wstring& value_name, | 119 const std::wstring& value_name, |
112 DWORD value_data, | 120 DWORD value_data, |
113 bool overwrite); | 121 bool overwrite, |
122 RegWow64ViewOption reg_wow64_option); | |
114 | 123 |
115 // Add a SetRegValueWorkItem that sets a registry value with REG_QWORD type | 124 // Add a SetRegValueWorkItem that sets a registry value with REG_QWORD type |
116 // at the key with specified path. | 125 // at the key with specified path. |
117 virtual WorkItem* AddSetRegValueWorkItem(HKEY predefined_root, | 126 virtual WorkItem* AddSetRegValueWorkItem(HKEY predefined_root, |
118 const std::wstring& key_path, | 127 const std::wstring& key_path, |
119 const std::wstring& value_name, | 128 const std::wstring& value_name, |
120 int64 value_data, | 129 int64 value_data, |
121 bool overwrite); | 130 bool overwrite, |
131 RegWow64ViewOption reg_wow64_option); | |
122 | 132 |
123 // Add a SelfRegWorkItem that registers or unregisters a DLL at the | 133 // Add a SelfRegWorkItem that registers or unregisters a DLL at the |
124 // specified path. If user_level_registration is true, then alternate | 134 // specified path. If user_level_registration is true, then alternate |
125 // registration and unregistration entry point names will be used. | 135 // registration and unregistration entry point names will be used. |
126 virtual WorkItem* AddSelfRegWorkItem(const std::wstring& dll_path, | 136 virtual WorkItem* AddSelfRegWorkItem(const std::wstring& dll_path, |
127 bool do_register, | 137 bool do_register, |
128 bool user_level_registration); | 138 bool user_level_registration); |
129 | 139 |
130 protected: | 140 protected: |
131 friend class WorkItem; | 141 friend class WorkItem; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
165 // Execute the WorkItems in the same order as they are added to the list. | 175 // Execute the WorkItems in the same order as they are added to the list. |
166 // If a WorkItem fails, the function will return failure but all other | 176 // If a WorkItem fails, the function will return failure but all other |
167 // WorkItems will still be executed. | 177 // WorkItems will still be executed. |
168 virtual bool Do(); | 178 virtual bool Do(); |
169 | 179 |
170 // No-op. | 180 // No-op. |
171 virtual void Rollback(); | 181 virtual void Rollback(); |
172 }; | 182 }; |
173 | 183 |
174 #endif // CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ | 184 #endif // CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ |
OLD | NEW |