| 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 // Base class for managing an action of a sequence of actions to be carried | 5 // Base class for managing an action of a sequence of actions to be carried |
| 6 // out during install/update/uninstall. Supports rollback of actions if this | 6 // out during install/update/uninstall. Supports rollback of actions if this |
| 7 // process fails. | 7 // process fails. |
| 8 | 8 |
| 9 #ifndef CHROME_INSTALLER_UTIL_WORK_ITEM_H_ | 9 #ifndef CHROME_INSTALLER_UTIL_WORK_ITEM_H_ |
| 10 #define CHROME_INSTALLER_UTIL_WORK_ITEM_H_ | 10 #define CHROME_INSTALLER_UTIL_WORK_ITEM_H_ |
| 11 #pragma once | 11 #pragma once |
| 12 | 12 |
| 13 #include <windows.h> | 13 #include <windows.h> |
| 14 |
| 14 #include <string> | 15 #include <string> |
| 16 #include <vector> |
| 15 | 17 |
| 16 class CopyTreeWorkItem; | 18 class CopyTreeWorkItem; |
| 17 class CreateDirWorkItem; | 19 class CreateDirWorkItem; |
| 18 class CreateRegKeyWorkItem; | 20 class CreateRegKeyWorkItem; |
| 19 class DeleteTreeWorkItem; | 21 class DeleteTreeWorkItem; |
| 20 class DeleteRegValueWorkItem; | 22 class DeleteRegValueWorkItem; |
| 21 class FilePath; | 23 class FilePath; |
| 22 class MoveTreeWorkItem; | 24 class MoveTreeWorkItem; |
| 23 class SelfRegWorkItem; | 25 class SelfRegWorkItem; |
| 24 class SetRegValueWorkItem; | 26 class SetRegValueWorkItem; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 static DeleteRegValueWorkItem* CreateDeleteRegValueWorkItem( | 66 static DeleteRegValueWorkItem* CreateDeleteRegValueWorkItem( |
| 65 HKEY predefined_root, | 67 HKEY predefined_root, |
| 66 const std::wstring& key_path, | 68 const std::wstring& key_path, |
| 67 const std::wstring& value_name, | 69 const std::wstring& value_name, |
| 68 bool is_str_type); | 70 bool is_str_type); |
| 69 | 71 |
| 70 // Create a DeleteTreeWorkItem that recursively deletes a file system | 72 // Create a DeleteTreeWorkItem that recursively deletes a file system |
| 71 // hierarchy at the given root path. A key file can be optionally specified | 73 // hierarchy at the given root path. A key file can be optionally specified |
| 72 // by key_path. | 74 // by key_path. |
| 73 static DeleteTreeWorkItem* CreateDeleteTreeWorkItem( | 75 static DeleteTreeWorkItem* CreateDeleteTreeWorkItem( |
| 74 const std::wstring& root_path, const std::wstring& key_path); | 76 const FilePath& root_path, const std::vector<FilePath>& key_paths); |
| 75 | 77 |
| 76 // Create a MoveTreeWorkItem that recursively moves a file system hierarchy | 78 // Create a MoveTreeWorkItem that recursively moves a file system hierarchy |
| 77 // from source path to destination path. | 79 // from source path to destination path. |
| 78 static MoveTreeWorkItem* CreateMoveTreeWorkItem( | 80 static MoveTreeWorkItem* CreateMoveTreeWorkItem( |
| 79 const std::wstring& source_path, | 81 const std::wstring& source_path, |
| 80 const std::wstring& dest_path, | 82 const std::wstring& dest_path, |
| 81 const std::wstring& temp_dir); | 83 const std::wstring& temp_dir); |
| 82 | 84 |
| 83 // Create a SetRegValueWorkItem that sets a registry value with REG_SZ type | 85 // Create a SetRegValueWorkItem that sets a registry value with REG_SZ type |
| 84 // at the key with specified path. | 86 // at the key with specified path. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 128 |
| 127 // Return true if the WorkItem is transactional, return false if | 129 // Return true if the WorkItem is transactional, return false if |
| 128 // non-transactional. | 130 // non-transactional. |
| 129 virtual bool IsTransactional() { return false; } | 131 virtual bool IsTransactional() { return false; } |
| 130 | 132 |
| 131 protected: | 133 protected: |
| 132 WorkItem(); | 134 WorkItem(); |
| 133 }; | 135 }; |
| 134 | 136 |
| 135 #endif // CHROME_INSTALLER_UTIL_WORK_ITEM_H_ | 137 #endif // CHROME_INSTALLER_UTIL_WORK_ITEM_H_ |
| OLD | NEW |