Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

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

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. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/installer/util/work_item.cc ('k') | chrome/installer/util/work_item_list.cc » ('j') | 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 #ifndef CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ 5 #ifndef CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_
6 #define CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ 6 #define CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <windows.h> 9 #include <windows.h>
10 10
11 #include <list> 11 #include <list>
12 #include <string> 12 #include <string>
13 #include <vector>
13 14
14 #include "chrome/installer/util/work_item.h" 15 #include "chrome/installer/util/work_item.h"
15 16
16 class FilePath; 17 class FilePath;
17 18
18 // A WorkItem subclass that recursively contains a list of WorkItems. Thus it 19 // A WorkItem subclass that recursively contains a list of WorkItems. Thus it
19 // provides functionalities to carry out or roll back the sequence of actions 20 // provides functionalities to carry out or roll back the sequence of actions
20 // defined by the list of WorkItems it contains. 21 // defined by the list of WorkItems it contains.
21 // The WorkItems are executed in the same order as they are added to the list. 22 // The WorkItems are executed in the same order as they are added to the list.
22 class WorkItemList : public WorkItem { 23 class WorkItemList : public WorkItem {
(...skipping 30 matching lines...) Expand all
53 // Add a DeleteRegValueWorkItem that deletes registry value of type REG_SZ 54 // Add a DeleteRegValueWorkItem that deletes registry value of type REG_SZ
54 // or REG_DWORD. 55 // or REG_DWORD.
55 bool AddDeleteRegValueWorkItem(HKEY predefined_root, 56 bool AddDeleteRegValueWorkItem(HKEY predefined_root,
56 const std::wstring& key_path, 57 const std::wstring& key_path,
57 const std::wstring& value_name, 58 const std::wstring& value_name,
58 bool is_str_type); 59 bool is_str_type);
59 60
60 // Add a DeleteTreeWorkItem that recursively deletes a file system 61 // Add a DeleteTreeWorkItem that recursively deletes a file system
61 // hierarchy at the given root path. A key file can be optionally specified 62 // hierarchy at the given root path. A key file can be optionally specified
62 // by key_path. 63 // by key_path.
63 bool AddDeleteTreeWorkItem(const std::wstring& root_path, 64 bool AddDeleteTreeWorkItem(const FilePath& root_path,
64 const std::wstring& key_path); 65 const std::vector<FilePath>& key_paths);
66
67 // Same as above but without support for key files.
68 bool AddDeleteTreeWorkItem(const FilePath& root_path);
65 69
66 // Add a MoveTreeWorkItem to the list of work items. 70 // Add a MoveTreeWorkItem to the list of work items.
67 bool AddMoveTreeWorkItem(const std::wstring& source_path, 71 bool AddMoveTreeWorkItem(const std::wstring& source_path,
68 const std::wstring& dest_path, 72 const std::wstring& dest_path,
69 const std::wstring& temp_dir); 73 const std::wstring& temp_dir);
70 74
71 // Add a SetRegValueWorkItem that sets a registry value with REG_SZ type 75 // Add a SetRegValueWorkItem that sets a registry value with REG_SZ type
72 // at the key with specified path. 76 // at the key with specified path.
73 bool AddSetRegValueWorkItem(HKEY predefined_root, 77 bool AddSetRegValueWorkItem(HKEY predefined_root,
74 const std::wstring& key_path, 78 const std::wstring& key_path,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // Execute the WorkItems in the same order as they are added to the list. 133 // Execute the WorkItems in the same order as they are added to the list.
130 // If a WorkItem fails, the function will return failure but all other 134 // If a WorkItem fails, the function will return failure but all other
131 // WorkItems will still be executed. 135 // WorkItems will still be executed.
132 virtual bool Do(); 136 virtual bool Do();
133 137
134 // Just does a NOTREACHED. 138 // Just does a NOTREACHED.
135 virtual void Rollback(); 139 virtual void Rollback();
136 }; 140 };
137 141
138 #endif // CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ 142 #endif // CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_
OLDNEW
« no previous file with comments | « chrome/installer/util/work_item.cc ('k') | chrome/installer/util/work_item_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698