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 #include "chrome/installer/util/work_item_list.h" | 5 #include "chrome/installer/util/work_item_list.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "chrome/installer/util/logging_installer.h" | 9 #include "chrome/installer/util/logging_installer.h" |
10 #include "chrome/installer/util/copy_reg_key_work_item.h" | 10 #include "chrome/installer/util/copy_reg_key_work_item.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
191 const std::wstring& value_name, | 191 const std::wstring& value_name, |
192 int64 value_data, | 192 int64 value_data, |
193 bool overwrite) { | 193 bool overwrite) { |
194 WorkItem* item = reinterpret_cast<WorkItem*>( | 194 WorkItem* item = reinterpret_cast<WorkItem*>( |
195 WorkItem::CreateSetRegValueWorkItem(predefined_root, key_path, value_name, | 195 WorkItem::CreateSetRegValueWorkItem(predefined_root, key_path, value_name, |
196 value_data, overwrite)); | 196 value_data, overwrite)); |
197 AddWorkItem(item); | 197 AddWorkItem(item); |
198 return item; | 198 return item; |
199 } | 199 } |
200 | 200 |
201 WorkItem* WorkItemList::AddSetOptionalBoolRegValueWorkItem( | |
202 HKEY predefined_root, const std::wstring& key_path, | |
203 const std::wstring& value_name, bool value_data) { | |
gab
2012/08/28 16:08:19
string16
huangs
2012/08/29 17:02:54
No longer need change this file.
| |
204 if (value_data) { | |
205 return AddSetRegValueWorkItem(predefined_root, key_path, value_name, | |
206 (DWORD) 1, true); | |
gab
2012/08/28 16:08:19
s/(DWORD) 1/static_cast<DWORD>(1)
huangs
2012/08/29 17:02:54
Done (in app_command.cc).
| |
207 } else { | |
208 return AddDeleteRegValueWorkItem(predefined_root, key_path, value_name); | |
209 } | |
210 } | |
211 | |
201 WorkItem* WorkItemList::AddSelfRegWorkItem(const std::wstring& dll_path, | 212 WorkItem* WorkItemList::AddSelfRegWorkItem(const std::wstring& dll_path, |
202 bool do_register, | 213 bool do_register, |
203 bool user_level_registration) { | 214 bool user_level_registration) { |
204 WorkItem* item = WorkItem::CreateSelfRegWorkItem(dll_path, do_register, | 215 WorkItem* item = WorkItem::CreateSelfRegWorkItem(dll_path, do_register, |
205 user_level_registration); | 216 user_level_registration); |
206 AddWorkItem(item); | 217 AddWorkItem(item); |
207 return item; | 218 return item; |
208 } | 219 } |
209 | 220 |
210 //////////////////////////////////////////////////////////////////////////////// | 221 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 20 matching lines...) Expand all Loading... | |
231 if (result) | 242 if (result) |
232 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded"; | 243 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded"; |
233 | 244 |
234 status_ = LIST_EXECUTED; | 245 status_ = LIST_EXECUTED; |
235 return result; | 246 return result; |
236 } | 247 } |
237 | 248 |
238 void NoRollbackWorkItemList::Rollback() { | 249 void NoRollbackWorkItemList::Rollback() { |
239 NOTREACHED() << "Can't rollback a NoRollbackWorkItemList"; | 250 NOTREACHED() << "Can't rollback a NoRollbackWorkItemList"; |
240 } | 251 } |
OLD | NEW |