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

Unified Diff: chrome/installer/util/delete_reg_key_work_item.h

Issue 6598065: Add rollback support to DeleteRegKeyWorkItem.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_installer.gypi ('k') | chrome/installer/util/delete_reg_key_work_item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,12 @@
#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 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.
class DeleteRegKeyWorkItem : public WorkItem {
public:
virtual ~DeleteRegKeyWorkItem();
@@ -23,6 +26,7 @@
virtual void Rollback();
private:
+ class RegKeyBackup;
friend class WorkItem;
DeleteRegKeyWorkItem(HKEY predefined_root, const std::wstring& path);
@@ -34,10 +38,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);
};
« no previous file with comments | « chrome/chrome_installer.gypi ('k') | chrome/installer/util/delete_reg_key_work_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698