| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 DCHECK(status_ == ADD_ITEM); | 71 DCHECK(status_ == ADD_ITEM); |
| 72 list_.push_back(work_item); | 72 list_.push_back(work_item); |
| 73 } | 73 } |
| 74 | 74 |
| 75 WorkItem* WorkItemList::AddCopyTreeWorkItem( | 75 WorkItem* WorkItemList::AddCopyTreeWorkItem( |
| 76 const std::wstring& source_path, | 76 const std::wstring& source_path, |
| 77 const std::wstring& dest_path, | 77 const std::wstring& dest_path, |
| 78 const std::wstring& temp_dir, | 78 const std::wstring& temp_dir, |
| 79 CopyOverWriteOption overwrite_option, | 79 CopyOverWriteOption overwrite_option, |
| 80 const std::wstring& alternative_path) { | 80 const std::wstring& alternative_path) { |
| 81 WorkItem* item = WorkItem::CreateCopyTreeWorkItem(source_path, | 81 WorkItem* item = WorkItem::CreateCopyTreeWorkItem(FilePath(source_path), |
| 82 dest_path, | 82 FilePath(dest_path), |
| 83 temp_dir, | 83 FilePath(temp_dir), |
| 84 overwrite_option, | 84 overwrite_option, |
| 85 alternative_path); | 85 FilePath(alternative_path)); |
| 86 AddWorkItem(item); | 86 AddWorkItem(item); |
| 87 return item; | 87 return item; |
| 88 } | 88 } |
| 89 | 89 |
| 90 WorkItem* WorkItemList::AddCreateDirWorkItem(const FilePath& path) { | 90 WorkItem* WorkItemList::AddCreateDirWorkItem(const FilePath& path) { |
| 91 WorkItem* item = WorkItem::CreateCreateDirWorkItem(path); | 91 WorkItem* item = WorkItem::CreateCreateDirWorkItem(path); |
| 92 AddWorkItem(item); | 92 AddWorkItem(item); |
| 93 return item; | 93 return item; |
| 94 } | 94 } |
| 95 | 95 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded"; | 212 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded"; |
| 213 | 213 |
| 214 status_ = LIST_EXECUTED; | 214 status_ = LIST_EXECUTED; |
| 215 return result; | 215 return result; |
| 216 } | 216 } |
| 217 | 217 |
| 218 void NoRollbackWorkItemList::Rollback() { | 218 void NoRollbackWorkItemList::Rollback() { |
| 219 NOTREACHED() << "Can't rollback a NoRollbackWorkItemList"; | 219 NOTREACHED() << "Can't rollback a NoRollbackWorkItemList"; |
| 220 } | 220 } |
| 221 | 221 |
| OLD | NEW |