Commit 71948dac authored by Jay Harris's avatar Jay Harris Committed by Commit Bot

WebApps: Fixes a crash upon sign in in Chrome OS.

This was caused because PendingAppManager's shortcut_manager_ was not
being initialized in SetSubsystems. It was not caught by existing tests
because we disable shortcut creation in tests, as it's hard to
clean up afterwards.

In a followup CL I'm going to try and push shortcuts being disabled
further down the stack.

Bug: 1019319
Change-Id: I91d8b22eb5cdba67a23481db778e0c4f9724e632
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1890394Reviewed-by: default avatarGiovanni Ortuño Urquidi <ortuno@chromium.org>
Commit-Queue: Jay Harris <harrisjay@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711611}
parent ba0d4554
......@@ -37,9 +37,11 @@ PendingAppManager::~PendingAppManager() {
}
void PendingAppManager::SetSubsystems(AppRegistrar* registrar,
AppShortcutManager* shortcut_manager,
WebAppUiManager* ui_manager,
InstallFinalizer* finalizer) {
registrar_ = registrar;
shortcut_manager_ = shortcut_manager;
ui_manager_ = ui_manager;
finalizer_ = finalizer;
}
......
......@@ -56,6 +56,7 @@ class PendingAppManager {
virtual ~PendingAppManager();
void SetSubsystems(AppRegistrar* registrar,
AppShortcutManager* shortcut_manager,
WebAppUiManager* ui_manager,
InstallFinalizer* finalizer);
......
......@@ -24,7 +24,7 @@ TestPendingAppManager::TestPendingAppManager(TestAppRegistrar* registrar)
deduped_uninstall_count_(0),
registrar_(registrar) {
// TODO(crbug.com/973324): Wire this up to a TestInstallFinalizer.
SetSubsystems(registrar, nullptr, nullptr);
SetSubsystems(registrar, nullptr, nullptr, nullptr);
}
TestPendingAppManager::~TestPendingAppManager() = default;
......
......@@ -218,7 +218,8 @@ void WebAppProvider::ConnectSubsystems() {
install_finalizer_.get());
manifest_update_manager_->SetSubsystems(registrar_.get(), ui_manager_.get(),
install_manager_.get());
pending_app_manager_->SetSubsystems(registrar_.get(), ui_manager_.get(),
pending_app_manager_->SetSubsystems(registrar_.get(), shortcut_manager_.get(),
ui_manager_.get(),
install_finalizer_.get());
external_web_app_manager_->SetSubsystems(pending_app_manager_.get());
system_web_app_manager_->SetSubsystems(pending_app_manager_.get(),
......
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