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_tree_work_item.h" | 10 #include "chrome/installer/util/copy_tree_work_item.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 if (status_ != ADD_ITEM) | 201 if (status_ != ADD_ITEM) |
202 return false; | 202 return false; |
203 | 203 |
204 bool result = true; | 204 bool result = true; |
205 while (!list_.empty()) { | 205 while (!list_.empty()) { |
206 WorkItem* work_item = list_.front(); | 206 WorkItem* work_item = list_.front(); |
207 list_.pop_front(); | 207 list_.pop_front(); |
208 executed_list_.push_front(work_item); | 208 executed_list_.push_front(work_item); |
209 work_item->set_ignore_failure(true); | 209 work_item->set_ignore_failure(true); |
210 if (!work_item->Do()) { | 210 if (!work_item->Do()) { |
211 LOG(ERROR) << "NoRollbackWorkItemList: item execution failed."; | 211 LOG(ERROR) << "NoRollbackWorkItemList: item execution failed " |
| 212 << work_item->log_message(); |
212 result = false; | 213 result = false; |
213 } | 214 } |
214 } | 215 } |
215 | 216 |
216 if (result) | 217 if (result) |
217 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded"; | 218 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded"; |
218 | 219 |
219 status_ = LIST_EXECUTED; | 220 status_ = LIST_EXECUTED; |
220 return result; | 221 return result; |
221 } | 222 } |
222 | 223 |
223 void NoRollbackWorkItemList::Rollback() { | 224 void NoRollbackWorkItemList::Rollback() { |
224 NOTREACHED() << "Can't rollback a NoRollbackWorkItemList"; | 225 NOTREACHED() << "Can't rollback a NoRollbackWorkItemList"; |
225 } | 226 } |
226 | |
OLD | NEW |