Chromium Code Reviews

Side by Side Diff: chrome/installer/util/work_item_list.cc

Issue 5429002: Support for checking multiple keyfiles when removing an installation package.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « chrome/installer/util/work_item_list.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/file_path.h"
8 #include "chrome/installer/util/logging_installer.h" 9 #include "chrome/installer/util/logging_installer.h"
9 10
10 WorkItemList::~WorkItemList() { 11 WorkItemList::~WorkItemList() {
11 for (WorkItemIterator itr = list_.begin(); itr != list_.end(); ++itr) { 12 for (WorkItemIterator itr = list_.begin(); itr != list_.end(); ++itr) {
12 delete (*itr); 13 delete (*itr);
13 } 14 }
14 for (WorkItemIterator itr = executed_list_.begin(); 15 for (WorkItemIterator itr = executed_list_.begin();
15 itr != executed_list_.end(); ++itr) { 16 itr != executed_list_.end(); ++itr) {
16 delete (*itr); 17 delete (*itr);
17 } 18 }
(...skipping 74 matching lines...)
92 bool WorkItemList::AddDeleteRegValueWorkItem(HKEY predefined_root, 93 bool WorkItemList::AddDeleteRegValueWorkItem(HKEY predefined_root,
93 const std::wstring& key_path, 94 const std::wstring& key_path,
94 const std::wstring& value_name, 95 const std::wstring& value_name,
95 bool is_str_type) { 96 bool is_str_type) {
96 WorkItem* item = reinterpret_cast<WorkItem*>( 97 WorkItem* item = reinterpret_cast<WorkItem*>(
97 WorkItem::CreateDeleteRegValueWorkItem(predefined_root, key_path, 98 WorkItem::CreateDeleteRegValueWorkItem(predefined_root, key_path,
98 value_name, is_str_type)); 99 value_name, is_str_type));
99 return AddWorkItem(item); 100 return AddWorkItem(item);
100 } 101 }
101 102
102 bool WorkItemList::AddDeleteTreeWorkItem(const std::wstring& root_path, 103 bool WorkItemList::AddDeleteTreeWorkItem(
103 const std::wstring& key_path) { 104 const FilePath& root_path,
105 const std::vector<FilePath>& key_paths) {
104 WorkItem* item = reinterpret_cast<WorkItem*>( 106 WorkItem* item = reinterpret_cast<WorkItem*>(
105 WorkItem::CreateDeleteTreeWorkItem(root_path, key_path)); 107 WorkItem::CreateDeleteTreeWorkItem(root_path, key_paths));
106 return AddWorkItem(item); 108 return AddWorkItem(item);
107 } 109 }
108 110
111 bool WorkItemList::AddDeleteTreeWorkItem(const FilePath& root_path) {
112 std::vector<FilePath> no_key_files;
113 return AddDeleteTreeWorkItem(root_path, no_key_files);
114 }
115
109 bool WorkItemList::AddMoveTreeWorkItem(const std::wstring& source_path, 116 bool WorkItemList::AddMoveTreeWorkItem(const std::wstring& source_path,
110 const std::wstring& dest_path, 117 const std::wstring& dest_path,
111 const std::wstring& temp_dir) { 118 const std::wstring& temp_dir) {
112 WorkItem* item = reinterpret_cast<WorkItem*>( 119 WorkItem* item = reinterpret_cast<WorkItem*>(
113 WorkItem::CreateMoveTreeWorkItem(source_path, dest_path, temp_dir)); 120 WorkItem::CreateMoveTreeWorkItem(source_path, dest_path, temp_dir));
114 return AddWorkItem(item); 121 return AddWorkItem(item);
115 } 122 }
116 123
117 bool WorkItemList::AddSetRegValueWorkItem(HKEY predefined_root, 124 bool WorkItemList::AddSetRegValueWorkItem(HKEY predefined_root,
118 const std::wstring& key_path, 125 const std::wstring& key_path,
(...skipping 48 matching lines...)
167 result = false; 174 result = false;
168 } 175 }
169 } 176 }
170 177
171 if (result) 178 if (result)
172 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded"; 179 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded";
173 180
174 status_ = LIST_EXECUTED; 181 status_ = LIST_EXECUTED;
175 return result; 182 return result;
176 } 183 }
OLDNEW
« no previous file with comments | « chrome/installer/util/work_item_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine