Commit 3bee9bd8 authored by Jiewei Qian's avatar Jiewei Qian Committed by Commit Bot

system-web-app: use at() instead of find()->second

Use flat_map::at() introduced in https://crrev.com/c/1933849 to replace
find()->second, so the code reads easier.

Change-Id: I4f4e04da30e6c7bb7b8f2a2f9a7e582755295b67
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1939994
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Auto-Submit: Jiewei Qian  <qjw@chromium.org>
Reviewed-by: default avatarGiovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719880}
parent dccb421d
......@@ -59,7 +59,7 @@ base::flat_map<SystemAppType, SystemAppInfo> CreateSystemWebApps() {
if (SystemWebAppManager::IsAppEnabled(SystemAppType::CAMERA)) {
infos.emplace(SystemAppType::CAMERA,
SystemAppInfo("Camera", GURL("chrome://camera/pwa.html")));
infos.find(SystemAppType::CAMERA)->second.uninstall_and_replace = {
infos.at(SystemAppType::CAMERA).uninstall_and_replace = {
ash::kInternalAppIdCamera};
}
......@@ -67,18 +67,18 @@ base::flat_map<SystemAppType, SystemAppInfo> CreateSystemWebApps() {
infos.emplace(
SystemAppType::SETTINGS,
SystemAppInfo("OSSettings", GURL("chrome://os-settings/pwa.html")));
infos.find(SystemAppType::SETTINGS)->second.uninstall_and_replace = {
infos.at(SystemAppType::SETTINGS).uninstall_and_replace = {
chromeos::default_web_apps::kSettingsAppId,
ash::kInternalAppIdSettings};
} else {
infos.emplace(
SystemAppType::SETTINGS,
SystemAppInfo("BrowserSettings", GURL("chrome://settings/pwa.html")));
infos.find(SystemAppType::SETTINGS)->second.uninstall_and_replace = {
infos.at(SystemAppType::SETTINGS).uninstall_and_replace = {
ash::kInternalAppIdSettings};
}
// Large enough to see the heading text "Settings" in the top-left.
infos.find(SystemAppType::SETTINGS)->second.minimum_window_size = {300, 100};
infos.at(SystemAppType::SETTINGS).minimum_window_size = {300, 100};
if (SystemWebAppManager::IsAppEnabled(SystemAppType::TERMINAL)) {
infos.emplace(
......
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