Chromium Code Reviews| Index: chrome/installer/setup/setup_util.cc |
| diff --git a/chrome/installer/setup/setup_util.cc b/chrome/installer/setup/setup_util.cc |
| index 93826c86ad0c1409b7639320db0e7341c990d2e2..30fb51d9d53cbb5e8ebd349a1340a4eadc0ae464 100644 |
| --- a/chrome/installer/setup/setup_util.cc |
| +++ b/chrome/installer/setup/setup_util.cc |
| @@ -12,6 +12,7 @@ |
| #include <algorithm> |
| #include <iterator> |
| #include <set> |
| +#include <string> |
| #include "base/command_line.h" |
| #include "base/cpu.h" |
| @@ -31,6 +32,8 @@ |
| #include "chrome/installer/util/google_update_constants.h" |
| #include "chrome/installer/util/installation_state.h" |
| #include "chrome/installer/util/installer_state.h" |
| +#include "chrome/installer/util/master_preferences.h" |
| +#include "chrome/installer/util/master_preferences_constants.h" |
| #include "chrome/installer/util/util_constants.h" |
| #include "courgette/courgette.h" |
| #include "courgette/third_party/bsdiff.h" |
| @@ -540,6 +543,12 @@ base::string16 GuidToSquid(const base::string16& guid) { |
| return squid; |
| } |
| +bool IsRollbackEnabled(const MasterPreferences& prefs) { |
| + std::string rollback_flag = ""; |
|
Georges Khalil
2016/04/27 12:38:02
Should we always return false for non msi installs
zmin
2016/04/27 15:20:18
The rollback flag is stored in the installer data
Georges Khalil
2016/04/28 14:36:30
Gotcha.
|
| + prefs.GetString(master_preferences::kRollback, &rollback_flag); |
| + return rollback_flag == master_preferences::kRollbackEnable; |
| +} |
| + |
| ScopedTokenPrivilege::ScopedTokenPrivilege(const wchar_t* privilege_name) |
| : is_enabled_(false) { |
| HANDLE temp_handle; |