| 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_REGISTRY_KEY_BACKUP_H_ | 5 #ifndef CHROME_INSTALLER_UTIL_REGISTRY_KEY_BACKUP_H_ |
| 6 #define CHROME_INSTALLER_UTIL_REGISTRY_KEY_BACKUP_H_ | 6 #define CHROME_INSTALLER_UTIL_REGISTRY_KEY_BACKUP_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 | 12 |
| 13 // A container for a registry key, its values, and its subkeys. We don't use | 13 // A container for a registry key, its values, and its subkeys. We don't use |
| 14 // more obvious methods for various reasons: | 14 // more obvious methods for various reasons: |
| 15 // - RegCopyTree isn't supported pre-Vista, so we'd have to do something | 15 // - RegCopyTree isn't supported pre-Vista, so we'd have to do something |
| 16 // different for XP anyway. | 16 // different for XP anyway. |
| 17 // - SHCopyKey can't copy subkeys into a volatile destination, so we'd have to | 17 // - SHCopyKey can't copy subkeys into a volatile destination, so we'd have to |
| 18 // worry about polluting the registry. | 18 // worry about polluting the registry. |
| 19 // We don't persist security attributes since we only delete keys that we own, | 19 // We don't persist security attributes since we only delete keys that we own, |
| 20 // and we don't set custom attributes on them anyway. | 20 // and we don't set custom attributes on them anyway. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 40 private: | 40 private: |
| 41 class KeyData; | 41 class KeyData; |
| 42 | 42 |
| 43 // The values and subkeys of the backed-up key. | 43 // The values and subkeys of the backed-up key. |
| 44 scoped_ptr<KeyData> key_data_; | 44 scoped_ptr<KeyData> key_data_; |
| 45 | 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(RegistryKeyBackup); | 46 DISALLOW_COPY_AND_ASSIGN(RegistryKeyBackup); |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 #endif // CHROME_INSTALLER_UTIL_REGISTRY_KEY_BACKUP_H_ | 49 #endif // CHROME_INSTALLER_UTIL_REGISTRY_KEY_BACKUP_H_ |
| OLD | NEW |