Index: chrome/installer/util/delete_reg_key_work_item.h |
=================================================================== |
--- chrome/installer/util/delete_reg_key_work_item.h (revision 76372) |
+++ chrome/installer/util/delete_reg_key_work_item.h (working copy) |
@@ -11,9 +11,14 @@ |
#include <string> |
#include "base/basictypes.h" |
+#include "base/scoped_ptr.h" |
#include "chrome/installer/util/work_item.h" |
-// A WorkItem subclass that deletes a registry key at the given path. |
+// A WorkItem subclass that deletes a registry key at the given path. Be aware |
+// that if failures are not ignored, an in-memory backup is made of the key and |
+// its values. In the event of rollback, the key's values and subkeys are |
+// restored, but the key and its subkeys take on their default security |
+// descriptors. |
robertshield
2011/03/01 16:04:43
Could simplify the above comment to read:
"Be awa
grt (UTC plus 2)
2011/03/01 20:54:02
Done.
|
class DeleteRegKeyWorkItem : public WorkItem { |
public: |
virtual ~DeleteRegKeyWorkItem(); |
@@ -23,6 +28,7 @@ |
virtual void Rollback(); |
private: |
+ class RegKeyBackup; |
friend class WorkItem; |
DeleteRegKeyWorkItem(HKEY predefined_root, const std::wstring& path); |
@@ -34,10 +40,9 @@ |
// Path of the key to be deleted. |
std::wstring path_; |
- // Path in the registry that the key is backed up to. |
- std::wstring backup_path_; |
+ // Backup of the deleted key. |
+ scoped_ptr<RegKeyBackup> backup_; |
- private: |
DISALLOW_COPY_AND_ASSIGN(DeleteRegKeyWorkItem); |
}; |