| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_BROWSER_DOWNGRADE_USER_DATA_DOWNGRADE_H_ | 5 #ifndef CHROME_BROWSER_DOWNGRADE_USER_DATA_DOWNGRADE_H_ |
| 6 #define CHROME_BROWSER_DOWNGRADE_USER_DATA_DOWNGRADE_H_ | 6 #define CHROME_BROWSER_DOWNGRADE_USER_DATA_DOWNGRADE_H_ |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/version.h" | 9 #include "base/version.h" |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 base::Version GetLastVersion(const base::FilePath& user_data_dir); | 31 base::Version GetLastVersion(const base::FilePath& user_data_dir); |
| 32 | 32 |
| 33 // Schedules a search for the removal of any directories moved aside by | 33 // Schedules a search for the removal of any directories moved aside by |
| 34 // MoveUserDataForFirstRunAfterDowngrade. This operation is idempotent, | 34 // MoveUserDataForFirstRunAfterDowngrade. This operation is idempotent, |
| 35 // and may be safely called when no such directories exist. | 35 // and may be safely called when no such directories exist. |
| 36 void DeleteMovedUserDataSoon(); | 36 void DeleteMovedUserDataSoon(); |
| 37 | 37 |
| 38 // Returns true if Chrome is installed by MSI. | 38 // Returns true if Chrome is installed by MSI. |
| 39 bool IsMSIInstall(); | 39 bool IsMSIInstall(); |
| 40 | 40 |
| 41 // Changes the behavior of the above functions to simulate a downgrade for use | |
| 42 // in tests. MoveUserDataForFirstRunAfterDowngrade will no longer rely on | |
| 43 // registry and DeleteMovedUserDataSoon will always post task into blocking | |
| 44 // pool for brower test. | |
| 45 void SetSimulateDowngradeForTest(bool is_browser_test); | |
| 46 | |
| 47 } // namespace downgrade | 41 } // namespace downgrade |
| 48 | 42 |
| 49 #endif // CHROME_BROWSER_DOWNGRADE_USER_DATA_DOWNGRADE_H_ | 43 #endif // CHROME_BROWSER_DOWNGRADE_USER_DATA_DOWNGRADE_H_ |
| OLD | NEW |