OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/installer/util/logging_installer.h" | 8 #include "chrome/installer/util/logging_installer.h" |
9 | 9 |
10 WorkItemList::~WorkItemList() { | 10 WorkItemList::~WorkItemList() { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 bool WorkItemList::AddDeleteRegValueWorkItem(HKEY predefined_root, | 92 bool WorkItemList::AddDeleteRegValueWorkItem(HKEY predefined_root, |
93 const std::wstring& key_path, | 93 const std::wstring& key_path, |
94 const std::wstring& value_name, | 94 const std::wstring& value_name, |
95 bool is_str_type) { | 95 bool is_str_type) { |
96 WorkItem* item = reinterpret_cast<WorkItem*>( | 96 WorkItem* item = reinterpret_cast<WorkItem*>( |
97 WorkItem::CreateDeleteRegValueWorkItem(predefined_root, key_path, | 97 WorkItem::CreateDeleteRegValueWorkItem(predefined_root, key_path, |
98 value_name, is_str_type)); | 98 value_name, is_str_type)); |
99 return AddWorkItem(item); | 99 return AddWorkItem(item); |
100 } | 100 } |
101 | 101 |
102 bool WorkItemList::AddDeleteTreeWorkItem(const std::wstring& root_path, | 102 bool WorkItemList::AddDeleteTreeWorkItem( |
103 const std::wstring& key_path) { | 103 const FilePath& root_path, |
| 104 const std::vector<FilePath>& key_paths) { |
104 WorkItem* item = reinterpret_cast<WorkItem*>( | 105 WorkItem* item = reinterpret_cast<WorkItem*>( |
105 WorkItem::CreateDeleteTreeWorkItem(root_path, key_path)); | 106 WorkItem::CreateDeleteTreeWorkItem(root_path, key_paths)); |
106 return AddWorkItem(item); | 107 return AddWorkItem(item); |
107 } | 108 } |
108 | 109 |
109 bool WorkItemList::AddMoveTreeWorkItem(const std::wstring& source_path, | 110 bool WorkItemList::AddMoveTreeWorkItem(const std::wstring& source_path, |
110 const std::wstring& dest_path, | 111 const std::wstring& dest_path, |
111 const std::wstring& temp_dir) { | 112 const std::wstring& temp_dir) { |
112 WorkItem* item = reinterpret_cast<WorkItem*>( | 113 WorkItem* item = reinterpret_cast<WorkItem*>( |
113 WorkItem::CreateMoveTreeWorkItem(source_path, dest_path, temp_dir)); | 114 WorkItem::CreateMoveTreeWorkItem(source_path, dest_path, temp_dir)); |
114 return AddWorkItem(item); | 115 return AddWorkItem(item); |
115 } | 116 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 result = false; | 168 result = false; |
168 } | 169 } |
169 } | 170 } |
170 | 171 |
171 if (result) | 172 if (result) |
172 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded"; | 173 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded"; |
173 | 174 |
174 status_ = LIST_EXECUTED; | 175 status_ = LIST_EXECUTED; |
175 return result; | 176 return result; |
176 } | 177 } |
OLD | NEW |