Commit 90cdefd4 authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

Add crostini ContainerId::GetDefault

Bug: 846190
Change-Id: I07130721969f741891c1b8902cc22445c68032b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2217936
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Auto-Submit: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: default avatarJulian Watson <juwa@google.com>
Cr-Commit-Position: refs/heads/master@{#772989}
parent efd1d79b
...@@ -319,6 +319,10 @@ std::ostream& operator<<(std::ostream& ostream, ...@@ -319,6 +319,10 @@ std::ostream& operator<<(std::ostream& ostream,
<< container_id.container_name << "\")"; << container_id.container_name << "\")";
} }
ContainerId ContainerId::GetDefault() {
return ContainerId(kCrostiniDefaultVmName, kCrostiniDefaultContainerName);
}
bool IsUninstallable(Profile* profile, const std::string& app_id) { bool IsUninstallable(Profile* profile, const std::string& app_id) {
if (!CrostiniFeatures::Get()->IsEnabled(profile) || if (!CrostiniFeatures::Get()->IsEnabled(profile) ||
app_id == GetTerminalId()) { app_id == GetTerminalId()) {
......
...@@ -42,6 +42,8 @@ struct LinuxPackageInfo; ...@@ -42,6 +42,8 @@ struct LinuxPackageInfo;
struct ContainerId { struct ContainerId {
ContainerId(std::string vm_name, std::string container_name) noexcept; ContainerId(std::string vm_name, std::string container_name) noexcept;
static ContainerId GetDefault();
std::string vm_name; std::string vm_name;
std::string container_name; std::string container_name;
}; };
......
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