Commit 1f7eb063 authored by Greg Thompson's avatar Greg Thompson Committed by Commit Bot

More logging in InstallServiceWorkItemImpl to track down update failures.

BUG=1023080
R=ganesh@chromium.org

Change-Id: I4fd2e2c2fc7365f1977221e99993cea870d587be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2007766
Commit-Queue: S. Ganesh <ganesh@chromium.org>
Auto-Submit: Greg Thompson <grt@chromium.org>
Reviewed-by: default avatarS. Ganesh <ganesh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733538}
parent 2318d680
...@@ -134,17 +134,19 @@ bool InstallServiceWorkItemImpl::DoImpl() { ...@@ -134,17 +134,19 @@ bool InstallServiceWorkItemImpl::DoImpl() {
scm_.Set(::OpenSCManager(nullptr, nullptr, scm_.Set(::OpenSCManager(nullptr, nullptr,
SC_MANAGER_CONNECT | SC_MANAGER_CREATE_SERVICE)); SC_MANAGER_CONNECT | SC_MANAGER_CREATE_SERVICE));
if (!scm_.IsValid()) { if (!scm_.IsValid()) {
DPLOG(ERROR) << "::OpenSCManager Failed"; PLOG(ERROR) << "::OpenSCManager Failed";
RecordServiceInstallResult(ServiceInstallResult::kFailedOpenSCManager); RecordServiceInstallResult(ServiceInstallResult::kFailedOpenSCManager);
RecordWin32ApiErrorCode(kOpenSCManager); RecordWin32ApiErrorCode(kOpenSCManager);
return false; return false;
} }
if (!OpenService()) { if (!OpenService()) {
VPLOG(1) << "Attempting to install new service following failure to open";
const bool succeeded = InstallNewService(); const bool succeeded = InstallNewService();
if (succeeded) { if (succeeded) {
RecordServiceInstallResult(ServiceInstallResult::kSucceededFreshInstall); RecordServiceInstallResult(ServiceInstallResult::kSucceededFreshInstall);
} else { } else {
PLOG(ERROR) << "Failed to install service";
RecordServiceInstallResult(ServiceInstallResult::kFailedFreshInstall); RecordServiceInstallResult(ServiceInstallResult::kFailedFreshInstall);
RecordWin32ApiErrorCode(kCreateService); RecordWin32ApiErrorCode(kCreateService);
} }
...@@ -180,6 +182,7 @@ bool InstallServiceWorkItemImpl::DoImpl() { ...@@ -180,6 +182,7 @@ bool InstallServiceWorkItemImpl::DoImpl() {
return true; return true;
} }
PLOG(ERROR) << "Failed to install service with new name";
RecordServiceInstallResult( RecordServiceInstallResult(
ServiceInstallResult::kFailedInstallNewAfterFailedUpgrade); ServiceInstallResult::kFailedInstallNewAfterFailedUpgrade);
RecordWin32ApiErrorCode(kCreateService); RecordWin32ApiErrorCode(kCreateService);
......
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