Chromium Code Reviews| 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 #ifndef CHROME_INSTALLER_UTIL_COPY_TREE_WORK_ITEM_H_ | 5 #ifndef CHROME_INSTALLER_UTIL_COPY_TREE_WORK_ITEM_H_ |
| 6 #define CHROME_INSTALLER_UTIL_COPY_TREE_WORK_ITEM_H_ | 6 #define CHROME_INSTALLER_UTIL_COPY_TREE_WORK_ITEM_H_ |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 | 70 |
| 71 // Whether the original files have been moved to backup path under | 71 // Whether the original files have been moved to backup path under |
| 72 // temporary directory. If true, moving back is needed during rollback. | 72 // temporary directory. If true, moving back is needed during rollback. |
| 73 bool moved_to_backup_; | 73 bool moved_to_backup_; |
| 74 | 74 |
| 75 // Whether the source was copied to alternative_path_ because dest_path_ | 75 // Whether the source was copied to alternative_path_ because dest_path_ |
| 76 // existed and was in use. Needed during rollback. | 76 // existed and was in use. Needed during rollback. |
| 77 bool copied_to_alternate_path_; | 77 bool copied_to_alternate_path_; |
| 78 | 78 |
| 79 // The temporary directory into which the original dest_path_ has been moved. | 79 // The temporary directory into which the original dest_path_ has been moved. |
| 80 base::ScopedTempDir backup_path_; | 80 base::ScopedTempDir backup_dir_; |
| 81 | |
| 82 // The path to |backup_dir_| or empty if |backup_dir_| has not been created. | |
| 83 base::FilePath backup_path_; | |
|
vabr (Chromium)
2016/09/28 13:10:24
Adding the path separately allows the CopyTreeWork
| |
| 81 | 84 |
| 82 FRIEND_TEST_ALL_PREFIXES(CopyTreeWorkItemTest, CopyFileSameContent); | 85 FRIEND_TEST_ALL_PREFIXES(CopyTreeWorkItemTest, CopyFileSameContent); |
| 83 FRIEND_TEST_ALL_PREFIXES(CopyTreeWorkItemTest, CopyFileInUse); | 86 FRIEND_TEST_ALL_PREFIXES(CopyTreeWorkItemTest, CopyFileInUse); |
| 84 FRIEND_TEST_ALL_PREFIXES(CopyTreeWorkItemTest, CopyFileAndCleanup); | 87 FRIEND_TEST_ALL_PREFIXES(CopyTreeWorkItemTest, CopyFileAndCleanup); |
| 85 FRIEND_TEST_ALL_PREFIXES(CopyTreeWorkItemTest, NewNameAndCopyTest); | 88 FRIEND_TEST_ALL_PREFIXES(CopyTreeWorkItemTest, NewNameAndCopyTest); |
| 86 FRIEND_TEST_ALL_PREFIXES(CopyTreeWorkItemTest, CopyFileInUseAndCleanup); | 89 FRIEND_TEST_ALL_PREFIXES(CopyTreeWorkItemTest, CopyFileInUseAndCleanup); |
| 87 }; | 90 }; |
| 88 | 91 |
| 89 #endif // CHROME_INSTALLER_UTIL_COPY_TREE_WORK_ITEM_H_ | 92 #endif // CHROME_INSTALLER_UTIL_COPY_TREE_WORK_ITEM_H_ |
| OLD | NEW |