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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 } | 69 } |
70 | 70 |
71 void WorkItemList::AddWorkItem(WorkItem* work_item) { | 71 void WorkItemList::AddWorkItem(WorkItem* work_item) { |
72 DCHECK(status_ == ADD_ITEM); | 72 DCHECK(status_ == ADD_ITEM); |
73 list_.push_back(work_item); | 73 list_.push_back(work_item); |
74 } | 74 } |
75 | 75 |
76 WorkItem* WorkItemList::AddCopyRegKeyWorkItem( | 76 WorkItem* WorkItemList::AddCopyRegKeyWorkItem( |
77 HKEY predefined_root, | 77 HKEY predefined_root, |
78 const std::wstring& source_key_path, | 78 const std::wstring& source_key_path, |
79 const std::wstring& dest_key_path) { | 79 const std::wstring& dest_key_path, |
| 80 CopyOverWriteOption overwrite_option) { |
80 WorkItem* item = WorkItem::CreateCopyRegKeyWorkItem( | 81 WorkItem* item = WorkItem::CreateCopyRegKeyWorkItem( |
81 predefined_root, source_key_path, dest_key_path); | 82 predefined_root, source_key_path, dest_key_path, overwrite_option); |
82 AddWorkItem(item); | 83 AddWorkItem(item); |
83 return item; | 84 return item; |
84 } | 85 } |
85 | 86 |
86 WorkItem* WorkItemList::AddCopyTreeWorkItem( | 87 WorkItem* WorkItemList::AddCopyTreeWorkItem( |
87 const std::wstring& source_path, | 88 const std::wstring& source_path, |
88 const std::wstring& dest_path, | 89 const std::wstring& dest_path, |
89 const std::wstring& temp_dir, | 90 const std::wstring& temp_dir, |
90 CopyOverWriteOption overwrite_option, | 91 CopyOverWriteOption overwrite_option, |
91 const std::wstring& alternative_path) { | 92 const std::wstring& alternative_path) { |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 if (result) | 231 if (result) |
231 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded"; | 232 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded"; |
232 | 233 |
233 status_ = LIST_EXECUTED; | 234 status_ = LIST_EXECUTED; |
234 return result; | 235 return result; |
235 } | 236 } |
236 | 237 |
237 void NoRollbackWorkItemList::Rollback() { | 238 void NoRollbackWorkItemList::Rollback() { |
238 NOTREACHED() << "Can't rollback a NoRollbackWorkItemList"; | 239 NOTREACHED() << "Can't rollback a NoRollbackWorkItemList"; |
239 } | 240 } |
OLD | NEW |