Commit 836a311c authored by Greg Thompson's avatar Greg Thompson Committed by Commit Bot

Revert "[mini_installer] Move the fallback reporting to InstallerError."

This reverts commit 44f5ba08.

Reason for revert: This strategy doesn't work, so let's go back to the previous strategy. It doesn't work today, but will in an upcoming Google Update release.

Original change's description:
> [mini_installer] Move the fallback reporting to InstallerError.
> 
> https://crrev.com/798844 attempted to send up a signal regarding whether
> or not the fallback temp directory was used. Unfortunately, Omaha does
> not include the ExtraCode1 value for successful installs. It does,
> however, send up success HRESULTS in the InstallerError value. This CL,
> therefore, switches to that. The two values to look out for are
> 0x00044001 and 0x00044002 (two success HRESULTS in FACILITY_ITF that
> otherwise appear to be unused).
> 
> BUG=516207,1100280
> 
> Change-Id: I319c5dbe7162543a71465238c5320719225fa1f7
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2368353
> Auto-Submit: Greg Thompson <grt@chromium.org>
> Commit-Queue: S. Ganesh <ganesh@chromium.org>
> Reviewed-by: S. Ganesh <ganesh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#800584}

TBR=ganesh@chromium.org,grt@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 516207
Bug: 1100280
Change-Id: I38f6d27904d8f822c949fb07285ae63830ce533a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2374206Reviewed-by: default avatarGreg Thompson <grt@chromium.org>
Commit-Queue: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801304}
parent d6ba4f38
...@@ -103,14 +103,12 @@ void WriteInstallResults(const Configuration& configuration, ...@@ -103,14 +103,12 @@ void WriteInstallResults(const Configuration& configuration,
} }
} }
// Writes the value |installer_error| into InstallerError for reporting by // Writes the value |extra_code_1| into ExtraCode1 for reporting by Omaha.
// Omaha. void WriteExtraCode1(const Configuration& configuration, DWORD extra_code_1) {
void WriteInstallerError(const Configuration& configuration, // Write the value in Chrome ClientState key.
DWORD installer_error) {
// Write the value in Chrome's ClientState key.
RegKey key; RegKey key;
if (OpenInstallStateKey(configuration, &key)) if (OpenInstallStateKey(configuration, &key))
key.WriteDWValue(kInstallerErrorRegistryValue, installer_error); key.WriteDWValue(kInstallerExtraCode1RegistryValue, extra_code_1);
} }
// This function sets the flag in registry to indicate that Google Update // This function sets the flag in registry to indicate that Google Update
...@@ -918,21 +916,19 @@ ProcessExitResult WMain(HMODULE module) { ...@@ -918,21 +916,19 @@ ProcessExitResult WMain(HMODULE module) {
#if BUILDFLAG(GOOGLE_CHROME_BRANDING) #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
if (exit_code.IsSuccess()) { if (exit_code.IsSuccess()) {
// Send up a signal in InstallerError upon successful install where the // Send up a signal in ExtraCode1 upon successful install where the fallback
// fallback work dir location was used. This means that GetWorkDir failed to // work dir location was used. This means that GetWorkDir failed to create a
// create a temporary directory next to the executable (in a directory owned // temporary directory next to the executable (in a directory owned by
// by Omaha) then succeeded to create one in %TMP% and ultimately resulted // Omaha) then succeeded to create one in %TMP% and ultimately resulted in
// in a successful install/update. If we ~never see this signal, then we // a successful install/update. If we ~never see this signal, then we know
// know that it's safe to remove the fallback code and associated // that it's safe to remove the fallback code and associated cleanup. See
// cleanup. See https://crbug.com/516207 for more info. Pick two arbitrary // https://crbug.com/516207 for more info.
// success HRESULT values that should stand out obviously in queries. // Pick two arbitrary values that should stand out obviously in queries.
constexpr HRESULT kSucceededWithFallback = constexpr DWORD kSucceededWithFallback = 0x1U << 16;
MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0x4001); constexpr DWORD kSucceededWithoutFallback = 0x2U << 16;
constexpr HRESULT kSucceededWithoutFallback = WriteExtraCode1(configuration, work_dir_in_fallback
MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0x4002); ? kSucceededWithFallback
WriteInstallerError(configuration, work_dir_in_fallback : kSucceededWithoutFallback);
? kSucceededWithFallback
: kSucceededWithoutFallback);
} else { } else {
WriteInstallResults(configuration, exit_code); WriteInstallResults(configuration, exit_code);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment