diff options
Diffstat (limited to 'chrome/installer/gcapi/gcapi_reactivation.cc')
-rw-r--r-- | chrome/installer/gcapi/gcapi_reactivation.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/installer/gcapi/gcapi_reactivation.cc b/chrome/installer/gcapi/gcapi_reactivation.cc index 6755e2f..87abc0e 100644 --- a/chrome/installer/gcapi/gcapi_reactivation.cc +++ b/chrome/installer/gcapi/gcapi_reactivation.cc @@ -7,6 +7,7 @@ #include "base/time.h" #include "base/win/registry.h" #include "chrome/installer/util/google_update_constants.h" +#include "chrome/installer/gcapi/gcapi.h" using base::Time; using base::win::RegKey; @@ -44,9 +45,14 @@ bool HasBeenReactivatedByBrandCodes( return success; } -bool SetReactivationBrandCode(const std::wstring& brand_code) { +bool SetReactivationBrandCode(const std::wstring& brand_code, int shell_mode) { bool success = false; + // This function currently only should be run in a non-elevated shell, + // so we return "true" if it is being invoked from an elevated shell. + if (shell_mode == GCAPI_INVOKED_UAC_ELEVATION) + return true; + std::wstring path(google_update::kRegPathClientState); path += L"\\"; path += google_update::kChromeUpgradeCode; |