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

Side by Side Diff: chrome/installer/util/copy_reg_key_work_item.h

Issue 7890069: Added CopyRegKeyWorkItem in support of IE low rights policy fixes. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: sync'd to ToT again Created 9 years, 3 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 unified diff | Download patch
« no previous file with comments | « chrome/chrome_installer_util.gypi ('k') | chrome/installer/util/copy_reg_key_work_item.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_INSTALLER_UTIL_COPY_REG_KEY_WORK_ITEM_H_
6 #define CHROME_INSTALLER_UTIL_COPY_REG_KEY_WORK_ITEM_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "chrome/installer/util/registry_key_backup.h"
14 #include "chrome/installer/util/work_item.h"
15
16 // A WorkItem subclass that replaces the contents of one registry key with that
17 // of another (i.e., the destination is erased prior to the copy). Be aware
18 // that in the event of rollback the destination key's values and subkeys are
19 // restored but the key and its subkeys take on their default security
20 // descriptors.
21 class CopyRegKeyWorkItem : public WorkItem {
22 public:
23 virtual ~CopyRegKeyWorkItem();
24 virtual bool Do() OVERRIDE;
25 virtual void Rollback() OVERRIDE;
26
27 private:
28 friend class WorkItem;
29
30 // Neither |source_key_path| nor |dest_key_path| may be empty.
31 CopyRegKeyWorkItem(HKEY predefined_key,
32 const std::wstring& source_key_path,
33 const std::wstring& dest_key_path);
34
35 // Root key in which we operate. The root key must be one of the predefined
36 // keys on Windows.
37 HKEY predefined_root_;
38
39 // Path of the key to be copied.
40 std::wstring source_key_path_;
41
42 // Path of the destination key.
43 std::wstring dest_key_path_;
44
45 // Backup of the destination key.
46 RegistryKeyBackup backup_;
47
48 DISALLOW_COPY_AND_ASSIGN(CopyRegKeyWorkItem);
49 };
50
51 #endif // CHROME_INSTALLER_UTIL_COPY_REG_KEY_WORK_ITEM_H_
OLDNEW
« no previous file with comments | « chrome/chrome_installer_util.gypi ('k') | chrome/installer/util/copy_reg_key_work_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698