Commit b6c802fa authored by Jae Hoon Kim's avatar Jae Hoon Kim Committed by Commit Bot

Startup flow with DLC Install prior to ListVms

Installing DLC prior to ListVms will cutdown the timeout cost of waiting
for PluginVm Dispatcher to startup, which it won't be able to if
PluginVM DLC is missing anyways.

BUG=b:154285573
TEST=./unit_tests && ./browser_tests # --gtest_filter=*Plugin*

Change-Id: Ib8de3a36bfb2b60d755f0457d3c289b8c71cca4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2155053
Commit-Queue: Jae Hoon Kim <kimjae@chromium.org>
Reviewed-by: default avatarTimothy Loh <timloh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762113}
parent 72181aca
......@@ -162,15 +162,12 @@ void PluginVmManager::LaunchPluginVm() {
}
// Launching Plugin Vm goes through the following steps:
// 1) Start the Plugin Vm Dispatcher (no-op if already running)
// -- If starting the dispatcher fails, try installing the PluginVM DLC.
// 2) Call ListVms to get the state of the VM
// 3) Start the VM if necessary
// 4) Show the UI.
UpdateVmState(base::BindOnce(&PluginVmManager::OnListVmsForLaunch,
weak_ptr_factory_.GetWeakPtr()),
base::BindOnce(&PluginVmManager::InstallPluginVmDlc,
weak_ptr_factory_.GetWeakPtr()));
// 1) Ensure the PluginVM DLC is installed.
// 2) Start the Plugin Vm Dispatcher. (no-op if already running)
// 3) Call ListVms to get the state of the VM.
// 4) Start the VM if necessary.
// 5) Show the UI.
InstallPluginVmDlc();
}
void PluginVmManager::AddVmStartingObserver(
......
......@@ -18,6 +18,7 @@
#include "chrome/browser/ui/ash/launcher/shelf_spinner_controller.h"
#include "chrome/test/base/testing_profile.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/dlcservice/fake_dlcservice_client.h"
#include "chromeos/dbus/fake_concierge_client.h"
#include "chromeos/dbus/fake_seneschal_client.h"
#include "chromeos/dbus/fake_vm_plugin_dispatcher_client.h"
......@@ -42,6 +43,7 @@ class PluginVmManagerTest : public testing::Test {
chrome_launcher_controller_ = std::make_unique<ChromeLauncherController>(
testing_profile_.get(), shelf_model_.get());
histogram_tester_ = std::make_unique<base::HistogramTester>();
chromeos::DlcserviceClient::InitializeFake();
}
~PluginVmManagerTest() override {
......@@ -52,6 +54,7 @@ class PluginVmManagerTest : public testing::Test {
test_helper_.reset();
testing_profile_.reset();
chromeos::DBusThreadManager::Shutdown();
chromeos::DlcserviceClient::Shutdown();
}
protected:
......
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