Commit c42b751a authored by Giovanni Ortuño Urquidi's avatar Giovanni Ortuño Urquidi Committed by Commit Bot

desktop-pwas: Add logging for when the installed extension is disabled

We are seeing instances where the OS Settings apps fails to be installed
because the extension got disabled. Adding logging to figure out the
reason why the extension got disabled.

Bug: 1014166
Change-Id: Ic13505048e6bdb2b0657d63658f2e5c35b42938c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1866095Reviewed-by: default avatarEric Willigers <ericwilligers@chromium.org>
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706801}
parent a238a36e
......@@ -22,6 +22,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
#include "chrome/common/web_application_info.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/uninstall_reason.h"
......@@ -241,6 +242,9 @@ void BookmarkAppInstallFinalizer::OnExtensionInstalled(
DCHECK(extension);
if (extension != GetEnabledExtension(extension->id())) {
LOG(ERROR) << "Installed extension was disabled: "
<< ExtensionPrefs::Get(profile_)->GetDisableReasons(
extension->id());
std::move(callback).Run(web_app::AppId(),
web_app::InstallResultCode::kWebAppDisabled);
return;
......
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