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

Side by Side Diff: chrome/installer/util/work_item.cc

Issue 282363003: Add WOW64 support to the installer registry work items (Closed) Base URL: https://chromium.googlesource.com/chromium/src
Patch Set: nits. fix call to DeleteRegistryKey Created 6 years, 7 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/installer/util/work_item.h ('k') | chrome/installer/util/work_item_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/installer/util/work_item.h" 5 #include "chrome/installer/util/work_item.h"
6 6
7 #include <windows.h>
8
7 #include "chrome/installer/util/callback_work_item.h" 9 #include "chrome/installer/util/callback_work_item.h"
8 #include "chrome/installer/util/conditional_work_item_list.h" 10 #include "chrome/installer/util/conditional_work_item_list.h"
9 #include "chrome/installer/util/copy_reg_key_work_item.h"
10 #include "chrome/installer/util/copy_tree_work_item.h" 11 #include "chrome/installer/util/copy_tree_work_item.h"
11 #include "chrome/installer/util/create_dir_work_item.h" 12 #include "chrome/installer/util/create_dir_work_item.h"
12 #include "chrome/installer/util/create_reg_key_work_item.h" 13 #include "chrome/installer/util/create_reg_key_work_item.h"
13 #include "chrome/installer/util/delete_tree_work_item.h" 14 #include "chrome/installer/util/delete_tree_work_item.h"
14 #include "chrome/installer/util/delete_reg_key_work_item.h" 15 #include "chrome/installer/util/delete_reg_key_work_item.h"
15 #include "chrome/installer/util/delete_reg_value_work_item.h" 16 #include "chrome/installer/util/delete_reg_value_work_item.h"
16 #include "chrome/installer/util/move_tree_work_item.h" 17 #include "chrome/installer/util/move_tree_work_item.h"
17 #include "chrome/installer/util/self_reg_work_item.h" 18 #include "chrome/installer/util/self_reg_work_item.h"
18 #include "chrome/installer/util/set_reg_value_work_item.h" 19 #include "chrome/installer/util/set_reg_value_work_item.h"
19 #include "chrome/installer/util/work_item_list.h" 20 #include "chrome/installer/util/work_item_list.h"
20 21
21 WorkItem::WorkItem() : ignore_failure_(false) { 22 WorkItem::WorkItem() : ignore_failure_(false) {
22 } 23 }
23 24
24 WorkItem::~WorkItem() { 25 WorkItem::~WorkItem() {
25 } 26 }
26 27
27 CallbackWorkItem* WorkItem::CreateCallbackWorkItem( 28 CallbackWorkItem* WorkItem::CreateCallbackWorkItem(
28 base::Callback<bool(const CallbackWorkItem&)> callback) { 29 base::Callback<bool(const CallbackWorkItem&)> callback) {
29 return new CallbackWorkItem(callback); 30 return new CallbackWorkItem(callback);
30 } 31 }
31 32
32 CopyRegKeyWorkItem* WorkItem::CreateCopyRegKeyWorkItem(
33 HKEY predefined_root,
34 const std::wstring& source_key_path,
35 const std::wstring& dest_key_path,
36 CopyOverWriteOption overwrite_option) {
37 return new CopyRegKeyWorkItem(predefined_root, source_key_path,
38 dest_key_path, overwrite_option);
39 }
40
41 CopyTreeWorkItem* WorkItem::CreateCopyTreeWorkItem( 33 CopyTreeWorkItem* WorkItem::CreateCopyTreeWorkItem(
42 const base::FilePath& source_path, 34 const base::FilePath& source_path,
43 const base::FilePath& dest_path, 35 const base::FilePath& dest_path,
44 const base::FilePath& temp_dir, 36 const base::FilePath& temp_dir,
45 CopyOverWriteOption overwrite_option, 37 CopyOverWriteOption overwrite_option,
46 const base::FilePath& alternative_path) { 38 const base::FilePath& alternative_path) {
47 return new CopyTreeWorkItem(source_path, dest_path, temp_dir, 39 return new CopyTreeWorkItem(source_path, dest_path, temp_dir,
48 overwrite_option, alternative_path); 40 overwrite_option, alternative_path);
49 } 41 }
50 42
51 CreateDirWorkItem* WorkItem::CreateCreateDirWorkItem( 43 CreateDirWorkItem* WorkItem::CreateCreateDirWorkItem(
52 const base::FilePath& path) { 44 const base::FilePath& path) {
53 return new CreateDirWorkItem(path); 45 return new CreateDirWorkItem(path);
54 } 46 }
55 47
56 CreateRegKeyWorkItem* WorkItem::CreateCreateRegKeyWorkItem( 48 CreateRegKeyWorkItem* WorkItem::CreateCreateRegKeyWorkItem(
57 HKEY predefined_root, const std::wstring& path) { 49 HKEY predefined_root,
58 return new CreateRegKeyWorkItem(predefined_root, path); 50 const std::wstring& path,
51 REGSAM wow64_access) {
52 return new CreateRegKeyWorkItem(predefined_root, path, wow64_access);
59 } 53 }
60 54
61 DeleteRegKeyWorkItem* WorkItem::CreateDeleteRegKeyWorkItem( 55 DeleteRegKeyWorkItem* WorkItem::CreateDeleteRegKeyWorkItem(
62 HKEY predefined_root, const std::wstring& path) { 56 HKEY predefined_root,
63 return new DeleteRegKeyWorkItem(predefined_root, path); 57 const std::wstring& path,
58 REGSAM wow64_access) {
59 return new DeleteRegKeyWorkItem(predefined_root, path, wow64_access);
64 } 60 }
65 61
66 DeleteRegValueWorkItem* WorkItem::CreateDeleteRegValueWorkItem( 62 DeleteRegValueWorkItem* WorkItem::CreateDeleteRegValueWorkItem(
67 HKEY predefined_root, 63 HKEY predefined_root,
68 const std::wstring& key_path, 64 const std::wstring& key_path,
65 REGSAM wow64_access,
69 const std::wstring& value_name) { 66 const std::wstring& value_name) {
70 return new DeleteRegValueWorkItem(predefined_root, key_path, value_name); 67 return new DeleteRegValueWorkItem(
68 predefined_root, key_path, wow64_access, value_name);
71 } 69 }
72 70
73 DeleteTreeWorkItem* WorkItem::CreateDeleteTreeWorkItem( 71 DeleteTreeWorkItem* WorkItem::CreateDeleteTreeWorkItem(
74 const base::FilePath& root_path, 72 const base::FilePath& root_path,
75 const base::FilePath& temp_path, 73 const base::FilePath& temp_path,
76 const std::vector<base::FilePath>& key_paths) { 74 const std::vector<base::FilePath>& key_paths) {
77 return new DeleteTreeWorkItem(root_path, temp_path, key_paths); 75 return new DeleteTreeWorkItem(root_path, temp_path, key_paths);
78 } 76 }
79 77
80 MoveTreeWorkItem* WorkItem::CreateMoveTreeWorkItem( 78 MoveTreeWorkItem* WorkItem::CreateMoveTreeWorkItem(
81 const base::FilePath& source_path, 79 const base::FilePath& source_path,
82 const base::FilePath& dest_path, 80 const base::FilePath& dest_path,
83 const base::FilePath& temp_dir, 81 const base::FilePath& temp_dir,
84 MoveTreeOption duplicate_option) { 82 MoveTreeOption duplicate_option) {
85 return new MoveTreeWorkItem(source_path, 83 return new MoveTreeWorkItem(source_path,
86 dest_path, 84 dest_path,
87 temp_dir, 85 temp_dir,
88 duplicate_option); 86 duplicate_option);
89 } 87 }
90 88
91 SetRegValueWorkItem* WorkItem::CreateSetRegValueWorkItem( 89 SetRegValueWorkItem* WorkItem::CreateSetRegValueWorkItem(
92 HKEY predefined_root, 90 HKEY predefined_root,
93 const std::wstring& key_path, 91 const std::wstring& key_path,
92 REGSAM wow64_access,
94 const std::wstring& value_name, 93 const std::wstring& value_name,
95 const std::wstring& value_data, 94 const std::wstring& value_data,
96 bool overwrite) { 95 bool overwrite) {
97 return new SetRegValueWorkItem(predefined_root, key_path, 96 return new SetRegValueWorkItem(predefined_root,
98 value_name, value_data, overwrite); 97 key_path,
98 wow64_access,
99 value_name,
100 value_data,
101 overwrite);
99 } 102 }
100 103
101 SetRegValueWorkItem* WorkItem::CreateSetRegValueWorkItem( 104 SetRegValueWorkItem* WorkItem::CreateSetRegValueWorkItem(
102 HKEY predefined_root, 105 HKEY predefined_root,
103 const std::wstring& key_path, 106 const std::wstring& key_path,
107 REGSAM wow64_access,
104 const std::wstring& value_name, 108 const std::wstring& value_name,
105 DWORD value_data, 109 DWORD value_data,
106 bool overwrite) { 110 bool overwrite) {
107 return new SetRegValueWorkItem(predefined_root, key_path, 111 return new SetRegValueWorkItem(predefined_root,
108 value_name, value_data, overwrite); 112 key_path,
113 wow64_access,
114 value_name,
115 value_data,
116 overwrite);
109 } 117 }
110 118
111 SetRegValueWorkItem* WorkItem::CreateSetRegValueWorkItem( 119 SetRegValueWorkItem* WorkItem::CreateSetRegValueWorkItem(
112 HKEY predefined_root, 120 HKEY predefined_root,
113 const std::wstring& key_path, 121 const std::wstring& key_path,
122 REGSAM wow64_access,
114 const std::wstring& value_name, 123 const std::wstring& value_name,
115 int64 value_data, 124 int64 value_data,
116 bool overwrite) { 125 bool overwrite) {
117 return new SetRegValueWorkItem(predefined_root, key_path, 126 return new SetRegValueWorkItem(predefined_root,
118 value_name, value_data, overwrite); 127 key_path,
128 wow64_access,
129 value_name,
130 value_data,
131 overwrite);
119 } 132 }
120 133
121 SelfRegWorkItem* WorkItem::CreateSelfRegWorkItem(const std::wstring& dll_path, 134 SelfRegWorkItem* WorkItem::CreateSelfRegWorkItem(const std::wstring& dll_path,
122 bool do_register, 135 bool do_register,
123 bool user_level_registration) { 136 bool user_level_registration) {
124 return new SelfRegWorkItem(dll_path, do_register, user_level_registration); 137 return new SelfRegWorkItem(dll_path, do_register, user_level_registration);
125 } 138 }
126 139
127 WorkItemList* WorkItem::CreateWorkItemList() { 140 WorkItemList* WorkItem::CreateWorkItemList() {
128 return new WorkItemList(); 141 return new WorkItemList();
129 } 142 }
130 143
131 // static 144 // static
132 WorkItemList* WorkItem::CreateNoRollbackWorkItemList() { 145 WorkItemList* WorkItem::CreateNoRollbackWorkItemList() {
133 return new NoRollbackWorkItemList(); 146 return new NoRollbackWorkItemList();
134 } 147 }
135 148
136 WorkItemList* WorkItem::CreateConditionalWorkItemList(Condition* condition) { 149 WorkItemList* WorkItem::CreateConditionalWorkItemList(Condition* condition) {
137 return new ConditionalWorkItemList(condition); 150 return new ConditionalWorkItemList(condition);
138 } 151 }
OLDNEW
« no previous file with comments | « chrome/installer/util/work_item.h ('k') | chrome/installer/util/work_item_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698