18be37518fbb891ada48cae5f4568dd5ff185df1 - chromium/src

26 views
Skip to first unread message

ano...@google.com

unread,
Jan 10, 2022, 2:17:57 AM1/10/22
to chromium...@chromium.org
commit 18be37518fbb891ada48cae5f4568dd5ff185df1
Author: Anosua Roy <ano...@google.com>
AuthorDate: Mon Jan 10 07:16:45 2022
Commit: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
CommitDate: Mon Jan 10 07:16:45 2022

Rename WebApplicationInfo

Changed all instances of "WebApplicationInfo"
to "WebAppInstallInfo"

web_application_info.h/cc will be renamed in a subsequent CL.

Bug: 1091473
Change-Id: I77d8732d570fbcee940990a1c1706964852fccb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3343547
Reviewed-by: Eric Willigers <ericwi...@chromium.org>
Reviewed-by: Dominick Ng <domi...@chromium.org>
Reviewed-by: Nico Weber <tha...@chromium.org>
Commit-Queue: Anosua Roy <ano...@google.com>
Cr-Commit-Position: refs/heads/main@{#956969}

diff --git a/chrome/browser/apps/app_service/browser_app_instance_tracker_browsertest.cc b/chrome/browser/apps/app_service/browser_app_instance_tracker_browsertest.cc
index b759ea7..f46889d24 100644
--- a/chrome/browser/apps/app_service/browser_app_instance_tracker_browsertest.cc
+++ b/chrome/browser/apps/app_service/browser_app_instance_tracker_browsertest.cc
@@ -284,7 +284,7 @@

web_app::AppId InstallWebApp(const std::string& start_url,
blink::mojom::DisplayMode user_display_mode) {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(start_url);
info->user_display_mode = user_display_mode;
Profile* profile = ProfileManager::GetPrimaryUserProfile();
diff --git a/chrome/browser/apps/app_service/media_access_browsertest.cc b/chrome/browser/apps/app_service/media_access_browsertest.cc
index f6bc1ab..39906be4 100644
--- a/chrome/browser/apps/app_service/media_access_browsertest.cc
+++ b/chrome/browser/apps/app_service/media_access_browsertest.cc
@@ -396,7 +396,7 @@
~MediaAccessWebAppsTest() override = default;

std::string CreateWebApp(const GURL& url) const {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = url;
web_app_info->scope = url;
return web_app::test::InstallWebApp(browser()->profile(),
diff --git a/chrome/browser/apps/app_service/metrics/app_platform_metrics_browsertest.cc b/chrome/browser/apps/app_service/metrics/app_platform_metrics_browsertest.cc
index 4d302da4..9f85ba1 100644
--- a/chrome/browser/apps/app_service/metrics/app_platform_metrics_browsertest.cc
+++ b/chrome/browser/apps/app_service/metrics/app_platform_metrics_browsertest.cc
@@ -29,7 +29,7 @@
AppId InstallWebApp(const GURL& start_url,
blink::mojom::DisplayMode display_mode,
blink::mojom::DisplayMode user_display_mode) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
web_app_info->display_mode = display_mode;
diff --git a/chrome/browser/apps/app_service/notifications_browsertest.cc b/chrome/browser/apps/app_service/notifications_browsertest.cc
index 6d38e56..aaac6da 100644
--- a/chrome/browser/apps/app_service/notifications_browsertest.cc
+++ b/chrome/browser/apps/app_service/notifications_browsertest.cc
@@ -270,7 +270,7 @@
}

std::string CreateWebApp(const GURL& url, const GURL& scope) const {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = url;
web_app_info->scope = scope;
std::string app_id = web_app::test::InstallWebApp(browser()->profile(),
diff --git a/chrome/browser/apps/app_service/publishers/publisher_unittest.cc b/chrome/browser/apps/app_service/publishers/publisher_unittest.cc
index ff58070..92ba7b08 100644
--- a/chrome/browser/apps/app_service/publishers/publisher_unittest.cc
+++ b/chrome/browser/apps/app_service/publishers/publisher_unittest.cc
@@ -119,7 +119,7 @@
std::string CreateWebApp(const std::string& app_name) {
const GURL kAppUrl("https://example.com/");

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->title = base::UTF8ToUTF16(app_name);
web_app_info->start_url = kAppUrl;
web_app_info->scope = kAppUrl;
diff --git a/chrome/browser/apps/app_service/webapk/webapk_install_task_unittest.cc b/chrome/browser/apps/app_service/webapk/webapk_install_task_unittest.cc
index ec3c729..d4006b6 100644
--- a/chrome/browser/apps/app_service/webapk/webapk_install_task_unittest.cc
+++ b/chrome/browser/apps/app_service/webapk/webapk_install_task_unittest.cc
@@ -41,8 +41,8 @@
constexpr char kTestShareTextParam[] = "share_text";
const std::u16string kTestAppTitle = u"Test App";

-std::unique_ptr<WebApplicationInfo> BuildDefaultWebAppInfo() {
- auto app_info = std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> BuildDefaultWebAppInfo() {
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->start_url = GURL(kTestAppUrl);
app_info->scope = GURL(kTestAppUrl);
app_info->title = kTestAppTitle;
@@ -265,7 +265,7 @@
}

TEST_F(WebApkInstallTaskTest, NoIconInManifest) {
- auto app_info = std::make_unique<WebApplicationInfo>();
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->start_url = GURL(kTestAppUrl);
app_info->scope = GURL(kTestAppUrl);
app_info->title = kTestAppTitle;
diff --git a/chrome/browser/apps/app_service/webapk/webapk_manager_unittest.cc b/chrome/browser/apps/app_service/webapk/webapk_manager_unittest.cc
index d4663ac..46556be3 100644
--- a/chrome/browser/apps/app_service/webapk/webapk_manager_unittest.cc
+++ b/chrome/browser/apps/app_service/webapk/webapk_manager_unittest.cc
@@ -40,8 +40,8 @@
constexpr char kTestWebApkPackageName[] = "org.chromium.webapk.some_package";
const std::u16string kTestAppTitle = u"Test App";

-std::unique_ptr<WebApplicationInfo> BuildDefaultWebAppInfo() {
- auto app_info = std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> BuildDefaultWebAppInfo() {
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->start_url = GURL(kTestAppUrl);
app_info->scope = GURL(kTestAppUrl);
app_info->title = kTestAppTitle;
@@ -153,7 +153,7 @@

// Does not install web apps without a Share Target definition.
TEST_F(WebApkManagerTest, NoShareTarget) {
- auto app_info = std::make_unique<WebApplicationInfo>();
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->start_url = GURL(kTestAppUrl);
app_info->title = kTestAppTitle;
auto app_id = web_app::test::InstallWebApp(profile(), std::move(app_info));
@@ -188,7 +188,7 @@
}

TEST_F(WebApkManagerTest, RemovesIneligibleWebApkOnStartup) {
- auto app_info = std::make_unique<WebApplicationInfo>();
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->start_url = GURL(kTestAppUrl);
app_info->title = kTestAppTitle;
auto app_id = web_app::test::InstallWebApp(profile(), std::move(app_info));
diff --git a/chrome/browser/apps/app_shim/web_app_shim_manager_delegate_mac_unittest.cc b/chrome/browser/apps/app_shim/web_app_shim_manager_delegate_mac_unittest.cc
index 7a7f6266..fbad0863 100644
--- a/chrome/browser/apps/app_shim/web_app_shim_manager_delegate_mac_unittest.cc
+++ b/chrome/browser/apps/app_shim/web_app_shim_manager_delegate_mac_unittest.cc
@@ -410,7 +410,7 @@
features::kDesktopPWAsAppIconShortcutsMenuUI);

// Install a dummy app with shortcut menu items
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
WebAppShortcutsMenuItemInfo shortcut_info1;
WebAppShortcutsMenuItemInfo shortcut_info2;
WebAppShortcutsMenuItemInfo shortcut_info3;
diff --git a/chrome/browser/ash/android_sms/android_sms_app_setup_controller_impl_unittest.cc b/chrome/browser/ash/android_sms/android_sms_app_setup_controller_impl_unittest.cc
index 1825cc71..6448ad5 100644
--- a/chrome/browser/ash/android_sms/android_sms_app_setup_controller_impl_unittest.cc
+++ b/chrome/browser/ash/android_sms/android_sms_app_setup_controller_impl_unittest.cc
@@ -242,7 +242,7 @@
base::HistogramTester histogram_tester;

SetInstallResultCode(
- web_app::InstallResultCode::kGetWebApplicationInfoFailed);
+ web_app::InstallResultCode::kGetWebAppInstallInfoFailed);

setup_controller_->SetUpApp(
app_url, install_url,
diff --git a/chrome/browser/ash/app_mode/web_app/web_kiosk_app_data.cc b/chrome/browser/ash/app_mode/web_app/web_kiosk_app_data.cc
index 3646b81..9e4aa50 100644
--- a/chrome/browser/ash/app_mode/web_app/web_kiosk_app_data.cc
+++ b/chrome/browser/ash/app_mode/web_app/web_kiosk_app_data.cc
@@ -214,7 +214,7 @@
}

void WebKioskAppData::UpdateFromWebAppInfo(
- std::unique_ptr<WebApplicationInfo> app_info) {
+ std::unique_ptr<WebAppInstallInfo> app_info) {
DCHECK(app_info);
name_ = base::UTF16ToUTF8(app_info->title);
base::FilePath cache_dir;
diff --git a/chrome/browser/ash/app_mode/web_app/web_kiosk_app_data.h b/chrome/browser/ash/app_mode/web_app/web_kiosk_app_data.h
index a2d6174..01614e25 100644
--- a/chrome/browser/ash/app_mode/web_app/web_kiosk_app_data.h
+++ b/chrome/browser/ash/app_mode/web_app/web_kiosk_app_data.h
@@ -13,7 +13,7 @@
#include "ui/gfx/image/image_skia.h"
#include "url/gurl.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

namespace ash {

@@ -56,7 +56,7 @@
// update.
void SetStatus(Status status, bool notify = true);

- void UpdateFromWebAppInfo(std::unique_ptr<WebApplicationInfo> app_info);
+ void UpdateFromWebAppInfo(std::unique_ptr<WebAppInstallInfo> app_info);

void SetOnLoadedCallbackForTesting(base::OnceClosure callback);

diff --git a/chrome/browser/ash/app_mode/web_app/web_kiosk_app_data_browsertest.cc b/chrome/browser/ash/app_mode/web_app/web_kiosk_app_data_browsertest.cc
index edb81d2..9c70b0c 100644
--- a/chrome/browser/ash/app_mode/web_app/web_kiosk_app_data_browsertest.cc
+++ b/chrome/browser/ash/app_mode/web_app/web_kiosk_app_data_browsertest.cc
@@ -236,7 +236,7 @@
EXPECT_EQ(app_data.GetLaunchableUrl(), GURL(kAppUrl));

// `start_url` is treated as launchable URL if the app has been installed.
- auto app_info = std::make_unique<WebApplicationInfo>();
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->start_url = GURL(kStartUrl);
app_data.UpdateFromWebAppInfo(std::move(app_info));
app_data.LoadFromCache();
diff --git a/chrome/browser/ash/app_mode/web_app/web_kiosk_app_launcher.cc b/chrome/browser/ash/app_mode/web_app/web_kiosk_app_launcher.cc
index df795d7..27d4840 100644
--- a/chrome/browser/ash/app_mode/web_app/web_kiosk_app_launcher.cc
+++ b/chrome/browser/ash/app_mode/web_app/web_kiosk_app_launcher.cc
@@ -64,7 +64,7 @@
profile_, /*os_integration_manager=*/nullptr,
/*install_finalizer=*/nullptr, data_retriever_factory_.Run(),
/*registrar=*/nullptr);
- install_task_->LoadAndRetrieveWebApplicationInfoWithIcons(
+ install_task_->LoadAndRetrieveWebAppInstallInfoWithIcons(
WebKioskAppManager::Get()->GetAppByAccountId(account_id_)->install_url(),
url_loader_.get(),
base::BindOnce(&WebKioskAppLauncher::OnAppDataObtained,
@@ -79,7 +79,7 @@
}

void WebKioskAppLauncher::OnAppDataObtained(
- std::unique_ptr<WebApplicationInfo> app_info) {
+ std::unique_ptr<WebAppInstallInfo> app_info) {
if (!app_info) {
// Notify about failed installation, let the controller decide what to do.
delegate_->OnLaunchFailed(KioskAppLaunchError::Error::kUnableToInstall);
diff --git a/chrome/browser/ash/app_mode/web_app/web_kiosk_app_launcher.h b/chrome/browser/ash/app_mode/web_app/web_kiosk_app_launcher.h
index ab35741..3f6b899 100644
--- a/chrome/browser/ash/app_mode/web_app/web_kiosk_app_launcher.h
+++ b/chrome/browser/ash/app_mode/web_app/web_kiosk_app_launcher.h
@@ -75,7 +75,7 @@

// Callback method triggered after web application and its icon are obtained
// from `WebKioskAppManager`.
- void OnAppDataObtained(std::unique_ptr<WebApplicationInfo> app_info);
+ void OnAppDataObtained(std::unique_ptr<WebAppInstallInfo> app_info);

// Callback method triggered after the lacros-chrome window is created.
void OnLacrosWindowCreated(crosapi::mojom::CreationResult result);
diff --git a/chrome/browser/ash/app_mode/web_app/web_kiosk_app_launcher_unittest.cc b/chrome/browser/ash/app_mode/web_app/web_kiosk_app_launcher_unittest.cc
index 5c41e14..e26eb2ad 100644
--- a/chrome/browser/ash/app_mode/web_app/web_kiosk_app_launcher_unittest.cc
+++ b/chrome/browser/ash/app_mode/web_app/web_kiosk_app_launcher_unittest.cc
@@ -62,10 +62,10 @@
std::unique_ptr<web_app::WebAppDataRetriever> CreateDataRetrieverWithData(
const GURL& url) {
auto data_retriever = std::make_unique<web_app::FakeDataRetriever>();
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = url;
info->title = kAppTitle;
- data_retriever->SetRendererWebApplicationInfo(std::move(info));
+ data_retriever->SetRendererWebAppInstallInfo(std::move(info));
return std::unique_ptr<web_app::WebAppDataRetriever>(
std::move(data_retriever));
}
@@ -130,7 +130,7 @@
app_manager_->AddAppForTesting(account_id_, GURL(kAppInstallUrl));

if (installed) {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(kAppLaunchUrl);
info->title = kAppTitle;
app_manager_->UpdateAppByAccountId(account_id_, std::move(info));
diff --git a/chrome/browser/ash/app_mode/web_app/web_kiosk_app_manager.cc b/chrome/browser/ash/app_mode/web_app/web_kiosk_app_manager.cc
index d46a54d..fa2e3f4 100644
--- a/chrome/browser/ash/app_mode/web_app/web_kiosk_app_manager.cc
+++ b/chrome/browser/ash/app_mode/web_app/web_kiosk_app_manager.cc
@@ -93,7 +93,7 @@

void WebKioskAppManager::UpdateAppByAccountId(
const AccountId& account_id,
- std::unique_ptr<WebApplicationInfo> app_info) {
+ std::unique_ptr<WebAppInstallInfo> app_info) {
for (auto& web_app : apps_) {
if (web_app->account_id() == account_id) {
web_app->UpdateFromWebAppInfo(std::move(app_info));
diff --git a/chrome/browser/ash/app_mode/web_app/web_kiosk_app_manager.h b/chrome/browser/ash/app_mode/web_app/web_kiosk_app_manager.h
index 0af8c00..20b83e4 100644
--- a/chrome/browser/ash/app_mode/web_app/web_kiosk_app_manager.h
+++ b/chrome/browser/ash/app_mode/web_app/web_kiosk_app_manager.h
@@ -15,7 +15,7 @@
class Browser;
class PrefRegistrySimple;
class Profile;
-struct WebApplicationInfo;
+struct WebAppInstallInfo;

namespace ash {

@@ -54,7 +54,7 @@

// Updates app by the data obtained during installation.
void UpdateAppByAccountId(const AccountId& account_id,
- std::unique_ptr<WebApplicationInfo> app_info);
+ std::unique_ptr<WebAppInstallInfo> app_info);

// Adds fake apps in tests.
void AddAppForTesting(const AccountId& account_id, const GURL& install_url);
diff --git a/chrome/browser/ash/app_restore/full_restore_app_launch_handler_browsertest.cc b/chrome/browser/ash/app_restore/full_restore_app_launch_handler_browsertest.cc
index 26304f6..bd5f9f5 100644
--- a/chrome/browser/ash/app_restore/full_restore_app_launch_handler_browsertest.cc
+++ b/chrome/browser/ash/app_restore/full_restore_app_launch_handler_browsertest.cc
@@ -231,7 +231,7 @@
}

void CreateWebApp() {
- auto web_application_info = std::make_unique<WebApplicationInfo>();
+ auto web_application_info = std::make_unique<WebAppInstallInfo>();
web_application_info->start_url = GURL("https://example.org");
web_app::AppId app_id = web_app::test::InstallWebApp(
profile(), std::move(web_application_info));
diff --git a/chrome/browser/ash/apps/apk_web_app_installer.cc b/chrome/browser/ash/apps/apk_web_app_installer.cc
index 98fd749..e676f0f 100644
--- a/chrome/browser/ash/apps/apk_web_app_installer.cc
+++ b/chrome/browser/ash/apps/apk_web_app_installer.cc
@@ -78,7 +78,7 @@
}

DCHECK(!web_app_info_);
- web_app_info_ = std::make_unique<WebApplicationInfo>();
+ web_app_info_ = std::make_unique<WebAppInstallInfo>();

web_app_info_->title = base::UTF8ToUTF16(web_app_info->title);

diff --git a/chrome/browser/ash/apps/apk_web_app_installer.h b/chrome/browser/ash/apps/apk_web_app_installer.h
index 73293f10..1ac3136 100644
--- a/chrome/browser/ash/apps/apk_web_app_installer.h
+++ b/chrome/browser/ash/apps/apk_web_app_installer.h
@@ -79,7 +79,7 @@
virtual void DoInstall();

bool has_web_app_info() const { return web_app_info_ != nullptr; }
- const WebApplicationInfo& web_app_info() const { return *web_app_info_; }
+ const WebAppInstallInfo& web_app_info() const { return *web_app_info_; }

private:
// If |weak_owner_| is ever invalidated while this class is working,
@@ -91,7 +91,7 @@
InstallFinishCallback callback_;
base::WeakPtr<Owner> weak_owner_;

- std::unique_ptr<WebApplicationInfo> web_app_info_;
+ std::unique_ptr<WebAppInstallInfo> web_app_info_;
};

} // namespace ash
diff --git a/chrome/browser/ash/apps/apk_web_app_installer_browsertest.cc b/chrome/browser/ash/apps/apk_web_app_installer_browsertest.cc
index b94be1e..3f49d5f4 100644
--- a/chrome/browser/ash/apps/apk_web_app_installer_browsertest.cc
+++ b/chrome/browser/ash/apps/apk_web_app_installer_browsertest.cc
@@ -62,8 +62,8 @@
return fake_app_instance->GenerateIconResponse(128, /*app_icon=*/true);
}

-std::unique_ptr<WebApplicationInfo> CreateWebApplicationInfo(const GURL& url) {
- auto web_application_info = std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInstallInfo(const GURL& url) {
+ auto web_application_info = std::make_unique<WebAppInstallInfo>();
web_application_info->start_url = url;
web_application_info->title = u"App Title";
web_application_info->theme_color = SK_ColorBLUE;
@@ -74,13 +74,13 @@
const std::vector<SquareSizePx> sizes_px{web_app::icon_size::k256,
web_app::icon_size::k512};
const std::vector<SkColor> colors{SK_ColorRED, SK_ColorYELLOW};
- web_app::AddIconsToWebApplicationInfo(web_application_info.get(), url,
- {{IconPurpose::ANY, sizes_px, colors}});
+ web_app::AddIconsToWebAppInstallInfo(web_application_info.get(), url,
+ {{IconPurpose::ANY, sizes_px, colors}});

return web_application_info;
}

-void ExpectInitialIconInfosFromWebApplicationInfo(
+void ExpectInitialIconInfosFromWebAppInstallInfo(
const std::vector<apps::IconInfo>& icon_infos,
const GURL& url) {
EXPECT_EQ(2u, icon_infos.size());
@@ -94,7 +94,7 @@
EXPECT_EQ(apps::IconInfo::Purpose::kAny, icon_infos[1].purpose);
}

-void ExpectInitialManifestFieldsFromWebApplicationInfo(
+void ExpectInitialManifestFieldsFromWebAppInstallInfo(
const web_app::WebAppIconManager& icon_manager,
const web_app::WebApp* web_app,
const GURL& url) {
@@ -114,12 +114,11 @@
EXPECT_EQ(url.Resolve("scope"), web_app->sync_fallback_data().scope);
{
SCOPED_TRACE("web_app->manifest_icons()");
- ExpectInitialIconInfosFromWebApplicationInfo(web_app->manifest_icons(),
- url);
+ ExpectInitialIconInfosFromWebAppInstallInfo(web_app->manifest_icons(), url);
}
{
SCOPED_TRACE("web_app->sync_fallback_data().icon_infos");
- ExpectInitialIconInfosFromWebApplicationInfo(
+ ExpectInitialIconInfosFromWebAppInstallInfo(
web_app->sync_fallback_data().icon_infos, url);
}

@@ -670,8 +669,8 @@
service->SetArcAppListPrefsForTesting(arc_app_list_prefs_);

// Install the Web App as if the user installs it.
- std::unique_ptr<WebApplicationInfo> web_application_info =
- CreateWebApplicationInfo(GURL(kAppUrl));
+ std::unique_ptr<WebAppInstallInfo> web_application_info =
+ CreateWebAppInstallInfo(GURL(kAppUrl));

web_app::AppId app_id = web_app::test::InstallWebApp(
browser()->profile(), std::move(web_application_info),
@@ -688,8 +687,8 @@

{
SCOPED_TRACE("Expect initial manifest fields.");
- ExpectInitialManifestFieldsFromWebApplicationInfo(icon_manager(), web_app,
- GURL(kAppUrl));
+ ExpectInitialManifestFieldsFromWebAppInstallInfo(icon_manager(), web_app,
+ GURL(kAppUrl));
}

// Install the Web App from ARC.
@@ -715,8 +714,8 @@

{
SCOPED_TRACE("Expect same manifest fields, no overwrites.");
- ExpectInitialManifestFieldsFromWebApplicationInfo(icon_manager(), web_app,
- GURL(kAppUrl));
+ ExpectInitialManifestFieldsFromWebAppInstallInfo(icon_manager(), web_app,
+ GURL(kAppUrl));
}
}

@@ -752,8 +751,8 @@
EXPECT_FALSE(web_app->IsSynced());

// Install the Web App as if the user installs it.
- std::unique_ptr<WebApplicationInfo> web_application_info =
- CreateWebApplicationInfo(GURL(kAppUrl));
+ std::unique_ptr<WebAppInstallInfo> web_application_info =
+ CreateWebAppInstallInfo(GURL(kAppUrl));

web_app::AppId web_app_id = web_app::test::InstallWebApp(
browser()->profile(), std::move(web_application_info),
@@ -772,8 +771,8 @@
SCOPED_TRACE(
"Expect online manifest fields, the offline fields from ARC have been "
"overwritten.");
- ExpectInitialManifestFieldsFromWebApplicationInfo(icon_manager(), web_app,
- GURL(kAppUrl));
+ ExpectInitialManifestFieldsFromWebAppInstallInfo(icon_manager(), web_app,
+ GURL(kAppUrl));
}
}

diff --git a/chrome/browser/ash/child_accounts/time_limits/web_time_limit_enforcer_browsertest.cc b/chrome/browser/ash/child_accounts/time_limits/web_time_limit_enforcer_browsertest.cc
index 624ac2a..2efa5766 100644
--- a/chrome/browser/ash/child_accounts/time_limits/web_time_limit_enforcer_browsertest.cc
+++ b/chrome/browser/ash/child_accounts/time_limits/web_time_limit_enforcer_browsertest.cc
@@ -178,7 +178,7 @@
content::WebContents* WebTimeLimitEnforcerThrottleTest::InstallAndLaunchWebApp(
const GURL& url,
bool allowlisted_app) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->title = base::UTF8ToUTF16(url.host());
web_app_info->description = u"Web app";
web_app_info->start_url = url;
diff --git a/chrome/browser/ash/file_manager/file_tasks_browsertest.cc b/chrome/browser/ash/file_manager/file_tasks_browsertest.cc
index 78bfb87..e451b0f 100644
--- a/chrome/browser/ash/file_manager/file_tasks_browsertest.cc
+++ b/chrome/browser/ash/file_manager/file_tasks_browsertest.cc
@@ -490,7 +490,7 @@
}

IN_PROC_BROWSER_TEST_P(FileTasksBrowserTest, ExecuteWebApp) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GURL("https://www.example.com/");
web_app_info->scope = GURL("https://www.example.com/");
apps::FileHandler handler;
diff --git a/chrome/browser/ash/login/app_mode/web_kiosk_browsertest.cc b/chrome/browser/ash/login/app_mode/web_kiosk_browsertest.cc
index ac38651..b5c4c09 100644
--- a/chrome/browser/ash/login/app_mode/web_kiosk_browsertest.cc
+++ b/chrome/browser/ash/login/app_mode/web_kiosk_browsertest.cc
@@ -88,7 +88,7 @@
}

void MakeAppAlreadyInstalled() {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(kAppLaunchUrl);
info->title = kAppTitle;
WebKioskAppManager::Get()->UpdateAppByAccountId(account_id(),
diff --git a/chrome/browser/ash/note_taking_helper_unittest.cc b/chrome/browser/ash/note_taking_helper_unittest.cc
index 155e11ae..a95d69e 100644
--- a/chrome/browser/ash/note_taking_helper_unittest.cc
+++ b/chrome/browser/ash/note_taking_helper_unittest.cc
@@ -748,7 +748,7 @@
Init(ENABLE_PALETTE);

{
- auto app_info = std::make_unique<WebApplicationInfo>();
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->start_url = GURL("http://some1.url");
app_info->scope = GURL("http://some1.url");
app_info->title = u"Web App 1";
@@ -756,7 +756,7 @@
}
std::string app2_id;
{
- auto app_info = std::make_unique<WebApplicationInfo>();
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->start_url = GURL("http://some2.url");
app_info->scope = GURL("http://some2.url");
app_info->title = u"Web App 2";
@@ -833,7 +833,7 @@
GURL app_url("https://yielding-large-chef.glitch.me/");
// Install a default-allowed web app corresponding to ID of
// |NoteTakingHelper::kNoteTakingWebAppIdTest|.
- auto app_info = std::make_unique<WebApplicationInfo>();
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->start_url = app_url;
app_info->title = u"Default Allowed Web App";
std::string app_id =
@@ -866,7 +866,7 @@

// Install a web app with a note_taking_new_note_url.
GURL new_note_url("http://some.url/new-note");
- auto app_info = std::make_unique<WebApplicationInfo>();
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->start_url = GURL("http://some.url");
app_info->scope = GURL("http://some.url");
app_info->title = u"Web App 2";
@@ -903,7 +903,7 @@
{
// Install a default-allowed web app corresponding to ID of
// |NoteTakingHelper::kNoteTakingWebAppIdTest|.
- auto app_info = std::make_unique<WebApplicationInfo>();
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->start_url = GURL("https://yielding-large-chef.glitch.me/");
app_info->title = u"Default Allowed Web App";
std::string app_id =
diff --git a/chrome/browser/ash/web_applications/camera_app/camera_system_web_app_info.cc b/chrome/browser/ash/web_applications/camera_app/camera_system_web_app_info.cc
index efe58a1..4f109b2 100644
--- a/chrome/browser/ash/web_applications/camera_app/camera_system_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/camera_app/camera_system_web_app_info.cc
@@ -25,8 +25,8 @@
32);
}

-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForCameraSystemWebApp() {
- auto info = std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForCameraSystemWebApp() {
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(ash::kChromeUICameraAppMainURL);
info->scope = GURL(ash::kChromeUICameraAppScopeURL);

@@ -68,7 +68,7 @@
{web_app::GetOrigin("chrome-untrusted://camera-app"),
{"WebAssemblyDynamicTiering"}}})) {}

-std::unique_ptr<WebApplicationInfo> CameraSystemAppDelegate::GetWebAppInfo()
+std::unique_ptr<WebAppInstallInfo> CameraSystemAppDelegate::GetWebAppInfo()
const {
return CreateWebAppInfoForCameraSystemWebApp();
}
diff --git a/chrome/browser/ash/web_applications/camera_app/camera_system_web_app_info.h b/chrome/browser/ash/web_applications/camera_app/camera_system_web_app_info.h
index 249f178..8d3fcac 100644
--- a/chrome/browser/ash/web_applications/camera_app/camera_system_web_app_info.h
+++ b/chrome/browser/ash/web_applications/camera_app/camera_system_web_app_info.h
@@ -12,21 +12,21 @@
#include "ui/gfx/geometry/rect.h"

class Browser;
-struct WebApplicationInfo;
+struct WebAppInstallInfo;

class CameraSystemAppDelegate : public web_app::SystemWebAppDelegate {
public:
explicit CameraSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool ShouldCaptureNavigations() const override;
gfx::Size GetMinimumWindowSize() const override;
gfx::Rect GetDefaultBounds(Browser* browser) const override;
};

-// Return a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForCameraSystemWebApp();
+// Return a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForCameraSystemWebApp();

// Returns the default bounds.
gfx::Rect GetDefaultBoundsForCameraApp(Browser*);
diff --git a/chrome/browser/ash/web_applications/connectivity_diagnostics_system_web_app_info.cc b/chrome/browser/ash/web_applications/connectivity_diagnostics_system_web_app_info.cc
index 0966382..24b3036 100644
--- a/chrome/browser/ash/web_applications/connectivity_diagnostics_system_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/connectivity_diagnostics_system_web_app_info.cc
@@ -15,10 +15,10 @@
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"

-std::unique_ptr<WebApplicationInfo>
+std::unique_ptr<WebAppInstallInfo>
CreateWebAppInfoForConnectivityDiagnosticsSystemWebApp() {
- std::unique_ptr<WebApplicationInfo> info =
- std::make_unique<WebApplicationInfo>();
+ std::unique_ptr<WebAppInstallInfo> info =
+ std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(ash::kChromeUIConnectivityDiagnosticsUrl);
info->scope = GURL(ash::kChromeUIConnectivityDiagnosticsUrl);
info->title = l10n_util::GetStringUTF16(IDS_CONNECTIVITY_DIAGNOSTICS_TITLE);
@@ -44,7 +44,7 @@
GURL(ash::kChromeUIConnectivityDiagnosticsUrl),
profile) {}

-std::unique_ptr<WebApplicationInfo>
+std::unique_ptr<WebAppInstallInfo>
ConnectivityDiagnosticsSystemAppDelegate::GetWebAppInfo() const {
return CreateWebAppInfoForConnectivityDiagnosticsSystemWebApp();
}
diff --git a/chrome/browser/ash/web_applications/connectivity_diagnostics_system_web_app_info.h b/chrome/browser/ash/web_applications/connectivity_diagnostics_system_web_app_info.h
index 8475677..d44575d 100644
--- a/chrome/browser/ash/web_applications/connectivity_diagnostics_system_web_app_info.h
+++ b/chrome/browser/ash/web_applications/connectivity_diagnostics_system_web_app_info.h
@@ -9,7 +9,7 @@
#include "chrome/browser/web_applications/system_web_apps/system_web_app_delegate.h"
#include "chrome/browser/web_applications/system_web_apps/system_web_app_types.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

class ConnectivityDiagnosticsSystemAppDelegate
: public web_app::SystemWebAppDelegate {
@@ -17,13 +17,13 @@
explicit ConnectivityDiagnosticsSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool ShouldShowInLauncher() const override;
bool ShouldShowInSearch() const override;
};

-// Returns a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo>
+// Returns a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo>
CreateWebAppInfoForConnectivityDiagnosticsSystemWebApp();

#endif // CHROME_BROWSER_ASH_WEB_APPLICATIONS_CONNECTIVITY_DIAGNOSTICS_SYSTEM_WEB_APP_INFO_H_
diff --git a/chrome/browser/ash/web_applications/crosh_system_web_app_info.cc b/chrome/browser/ash/web_applications/crosh_system_web_app_info.cc
index a6908ba..5a49ccd 100644
--- a/chrome/browser/ash/web_applications/crosh_system_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/crosh_system_web_app_info.cc
@@ -16,8 +16,8 @@
#include "third_party/blink/public/mojom/manifest/display_mode.mojom.h"
#include "url/gurl.h"

-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForCroshSystemWebApp() {
- auto info = std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForCroshSystemWebApp() {
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(chrome::kChromeUIUntrustedCroshURL);
info->scope = GURL(chrome::kChromeUIUntrustedCroshURL);
info->title = std::u16string(u"crosh");
@@ -34,7 +34,7 @@
GURL(chrome::kChromeUIUntrustedCroshURL),
profile) {}

-std::unique_ptr<WebApplicationInfo> CroshSystemAppDelegate::GetWebAppInfo()
+std::unique_ptr<WebAppInstallInfo> CroshSystemAppDelegate::GetWebAppInfo()
const {
return CreateWebAppInfoForCroshSystemWebApp();
}
diff --git a/chrome/browser/ash/web_applications/crosh_system_web_app_info.h b/chrome/browser/ash/web_applications/crosh_system_web_app_info.h
index 5d64ed4..8754313 100644
--- a/chrome/browser/ash/web_applications/crosh_system_web_app_info.h
+++ b/chrome/browser/ash/web_applications/crosh_system_web_app_info.h
@@ -12,21 +12,21 @@
#include "chrome/common/webui_url_constants.h"
#include "ui/gfx/geometry/rect.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

class CroshSystemAppDelegate : public web_app::SystemWebAppDelegate {
public:
explicit CroshSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool ShouldShowInLauncher() const override;
bool ShouldReuseExistingWindow() const override;
bool ShouldShowInSearch() const override;
bool ShouldHaveTabStrip() const override;
};

-// Returns a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForCroshSystemWebApp();
+// Returns a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForCroshSystemWebApp();

#endif // CHROME_BROWSER_ASH_WEB_APPLICATIONS_CROSH_SYSTEM_WEB_APP_INFO_H_
diff --git a/chrome/browser/ash/web_applications/demo_mode_web_app_info.cc b/chrome/browser/ash/web_applications/demo_mode_web_app_info.cc
index 3e69ae8..e5f6a5b 100644
--- a/chrome/browser/ash/web_applications/demo_mode_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/demo_mode_web_app_info.cc
@@ -11,9 +11,9 @@
#include "chrome/browser/ash/web_applications/system_web_app_install_utils.h"
#include "chrome/browser/web_applications/web_application_info.h"

-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForDemoModeApp() {
- std::unique_ptr<WebApplicationInfo> info =
- std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForDemoModeApp() {
+ std::unique_ptr<WebAppInstallInfo> info =
+ std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(ash::kChromeUIDemoModeAppURL);
info->scope = GURL(ash::kChromeUIDemoModeAppURL);
// TODO(b/185608502): Convert the title to a localized string
@@ -36,7 +36,7 @@
GURL("chrome://demo-mode-app"),
profile) {}

-std::unique_ptr<WebApplicationInfo> DemoModeSystemAppDelegate::GetWebAppInfo()
+std::unique_ptr<WebAppInstallInfo> DemoModeSystemAppDelegate::GetWebAppInfo()
const {
return CreateWebAppInfoForDemoModeApp();
}
diff --git a/chrome/browser/ash/web_applications/demo_mode_web_app_info.h b/chrome/browser/ash/web_applications/demo_mode_web_app_info.h
index 480f5dd..7eaff8c 100644
--- a/chrome/browser/ash/web_applications/demo_mode_web_app_info.h
+++ b/chrome/browser/ash/web_applications/demo_mode_web_app_info.h
@@ -8,7 +8,7 @@
#include "chrome/browser/web_applications/system_web_apps/system_web_app_delegate.h"
#include "chrome/browser/web_applications/system_web_apps/system_web_app_types.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

#if defined(OFFICIAL_BUILD)
#error Demo Mode should only be included in unofficial builds.
@@ -19,11 +19,11 @@
explicit DemoModeSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool ShouldCaptureNavigations() const override;
bool IsAppEnabled() const override;
};

-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForDemoModeApp();
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForDemoModeApp();

#endif // CHROME_BROWSER_ASH_WEB_APPLICATIONS_DEMO_MODE_WEB_APP_INFO_H_
diff --git a/chrome/browser/ash/web_applications/diagnostics_system_web_app_info.cc b/chrome/browser/ash/web_applications/diagnostics_system_web_app_info.cc
index bbc7ccd..069511d 100644
--- a/chrome/browser/ash/web_applications/diagnostics_system_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/diagnostics_system_web_app_info.cc
@@ -15,10 +15,10 @@
#include "third_party/blink/public/mojom/manifest/display_mode.mojom.h"
#include "url/gurl.h"

-std::unique_ptr<WebApplicationInfo>
+std::unique_ptr<WebAppInstallInfo>
CreateWebAppInfoForDiagnosticsSystemWebApp() {
- std::unique_ptr<WebApplicationInfo> info =
- std::make_unique<WebApplicationInfo>();
+ std::unique_ptr<WebAppInstallInfo> info =
+ std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(ash::kChromeUIDiagnosticsAppUrl);
info->scope = GURL(ash::kChromeUIDiagnosticsAppUrl);

@@ -45,8 +45,8 @@
GURL("chrome://diagnostics"),
profile) {}

-std::unique_ptr<WebApplicationInfo>
-DiagnosticsSystemAppDelegate::GetWebAppInfo() const {
+std::unique_ptr<WebAppInstallInfo> DiagnosticsSystemAppDelegate::GetWebAppInfo()
+ const {
return CreateWebAppInfoForDiagnosticsSystemWebApp();
}

diff --git a/chrome/browser/ash/web_applications/diagnostics_system_web_app_info.h b/chrome/browser/ash/web_applications/diagnostics_system_web_app_info.h
index 23ceddd..fd47d498 100644
--- a/chrome/browser/ash/web_applications/diagnostics_system_web_app_info.h
+++ b/chrome/browser/ash/web_applications/diagnostics_system_web_app_info.h
@@ -11,21 +11,20 @@

#include "ui/gfx/geometry/rect.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

class DiagnosticsSystemAppDelegate : public web_app::SystemWebAppDelegate {
public:
explicit DiagnosticsSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool ShouldShowInLauncher() const override;
gfx::Size GetMinimumWindowSize() const override;
bool IsAppEnabled() const override;
};

-// Returns a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo>
-CreateWebAppInfoForDiagnosticsSystemWebApp();
+// Returns a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForDiagnosticsSystemWebApp();

#endif // CHROME_BROWSER_ASH_WEB_APPLICATIONS_DIAGNOSTICS_SYSTEM_WEB_APP_INFO_H_
diff --git a/chrome/browser/ash/web_applications/eche_app_info.cc b/chrome/browser/ash/web_applications/eche_app_info.cc
index ad325f5..fd5081c 100644
--- a/chrome/browser/ash/web_applications/eche_app_info.cc
+++ b/chrome/browser/ash/web_applications/eche_app_info.cc
@@ -16,9 +16,9 @@
#include "third_party/blink/public/mojom/manifest/display_mode.mojom.h"
#include "ui/display/screen.h"

-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForEcheApp() {
- std::unique_ptr<WebApplicationInfo> info =
- std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForEcheApp() {
+ std::unique_ptr<WebAppInstallInfo> info =
+ std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(ash::eche_app::kChromeUIEcheAppURL);
info->scope = GURL(ash::eche_app::kChromeUIEcheAppURL);
// |title| should come from a resource string, but this is the Eche app, and
@@ -59,7 +59,7 @@
GURL("chrome://eche-app"),
profile) {}

-std::unique_ptr<WebApplicationInfo> EcheSystemAppDelegate::GetWebAppInfo()
+std::unique_ptr<WebAppInstallInfo> EcheSystemAppDelegate::GetWebAppInfo()
const {
return CreateWebAppInfoForEcheApp();
}
diff --git a/chrome/browser/ash/web_applications/eche_app_info.h b/chrome/browser/ash/web_applications/eche_app_info.h
index 0f8b514..949bb616 100644
--- a/chrome/browser/ash/web_applications/eche_app_info.h
+++ b/chrome/browser/ash/web_applications/eche_app_info.h
@@ -10,14 +10,14 @@
#include "ui/gfx/geometry/rect.h"

class Browser;
-struct WebApplicationInfo;
+struct WebAppInstallInfo;

class EcheSystemAppDelegate : public web_app::SystemWebAppDelegate {
public:
explicit EcheSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool ShouldCaptureNavigations() const override;
bool ShouldShowInLauncher() const override;
bool ShouldShowInSearch() const override;
@@ -29,8 +29,8 @@
bool IsAppEnabled() const override;
};

-// Return a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForEcheApp();
+// Return a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForEcheApp();

// Returns the default bounds.
gfx::Rect GetDefaultBoundsForEche(Browser*);
diff --git a/chrome/browser/ash/web_applications/file_manager_web_app_info.cc b/chrome/browser/ash/web_applications/file_manager_web_app_info.cc
index 4000282..62a7882 100644
--- a/chrome/browser/ash/web_applications/file_manager_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/file_manager_web_app_info.cc
@@ -29,7 +29,7 @@
// The handler action has the format: chrome://file-manager/?${ACTION_NAME}
// This means: For files with the given `file_extensions` or `mime_type` the
// Files SWA is a candidate app to open/handle such files.
-void AppendFileHandler(WebApplicationInfo& info,
+void AppendFileHandler(WebAppInstallInfo& info,
const std::string& action_name,
const base::flat_set<std::string>& file_extensions,
const std::string& mime_type = "") {
@@ -50,8 +50,8 @@

} // namespace

-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForFileManager() {
- auto info = std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForFileManager() {
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(kChromeUIFileManagerURL);
info->scope = GURL(kChromeUIFileManagerURL);
info->title = l10n_util::GetStringUTF16(IDS_FILEMANAGER_APP_NAME);
@@ -118,8 +118,8 @@
{{web_app::GetOrigin(kChromeUIFileManagerURL),
{"FileHandling"}}})) {}

-std::unique_ptr<WebApplicationInfo>
-FileManagerSystemAppDelegate::GetWebAppInfo() const {
+std::unique_ptr<WebAppInstallInfo> FileManagerSystemAppDelegate::GetWebAppInfo()
+ const {
return CreateWebAppInfoForFileManager();
}

diff --git a/chrome/browser/ash/web_applications/file_manager_web_app_info.h b/chrome/browser/ash/web_applications/file_manager_web_app_info.h
index 0d21e6c..beae4b7b 100644
--- a/chrome/browser/ash/web_applications/file_manager_web_app_info.h
+++ b/chrome/browser/ash/web_applications/file_manager_web_app_info.h
@@ -12,14 +12,14 @@
#include "chrome/browser/web_applications/system_web_apps/system_web_app_types.h"
#include "chrome/browser/web_applications/web_app_id.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

class FileManagerSystemAppDelegate : public web_app::SystemWebAppDelegate {
public:
explicit FileManagerSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool ShouldCaptureNavigations() const override;
bool ShouldReuseExistingWindow() const override;
bool ShouldShowNewWindowMenuOption() const override;
@@ -27,7 +27,7 @@
std::vector<web_app::AppId> GetAppIdsToUninstallAndReplace() const override;
};

-// Return a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForFileManager();
+// Return a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForFileManager();

#endif // CHROME_BROWSER_ASH_WEB_APPLICATIONS_FILE_MANAGER_WEB_APP_INFO_H_
diff --git a/chrome/browser/ash/web_applications/firmware_update_system_web_app_info.cc b/chrome/browser/ash/web_applications/firmware_update_system_web_app_info.cc
index 5fa8a989..31d708c8 100644
--- a/chrome/browser/ash/web_applications/firmware_update_system_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/firmware_update_system_web_app_info.cc
@@ -18,9 +18,9 @@
#include "ui/base/ui_base_features.h"

// TODO(michaelcheco): Update to correct icon.
-std::unique_ptr<WebApplicationInfo>
+std::unique_ptr<WebAppInstallInfo>
CreateWebAppInfoForFirmwareUpdateSystemWebApp() {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(ash::kChromeUIFirmwareUpdateAppURL);
info->scope = GURL(ash::kChromeUIFirmwareUpdateAppURL);
info->title = l10n_util::GetStringUTF16(IDS_ASH_FIRMWARE_UPDATE_APP_TITLE);
@@ -41,7 +41,7 @@
GURL(ash::kChromeUIFirmwareUpdateAppURL),
profile) {}

-std::unique_ptr<WebApplicationInfo>
+std::unique_ptr<WebAppInstallInfo>
FirmwareUpdateSystemAppDelegate::GetWebAppInfo() const {
return CreateWebAppInfoForFirmwareUpdateSystemWebApp();
}
diff --git a/chrome/browser/ash/web_applications/firmware_update_system_web_app_info.h b/chrome/browser/ash/web_applications/firmware_update_system_web_app_info.h
index e80a7fe..be2274b 100644
--- a/chrome/browser/ash/web_applications/firmware_update_system_web_app_info.h
+++ b/chrome/browser/ash/web_applications/firmware_update_system_web_app_info.h
@@ -8,19 +8,19 @@
#include "chrome/browser/web_applications/system_web_apps/system_web_app_delegate.h"
#include "ui/gfx/geometry/size.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

class FirmwareUpdateSystemAppDelegate : public web_app::SystemWebAppDelegate {
public:
explicit FirmwareUpdateSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
gfx::Size GetMinimumWindowSize() const override;
bool IsAppEnabled() const override;
};
-// Returns a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo>
+// Returns a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo>
CreateWebAppInfoForFirmwareUpdateSystemWebApp();

#endif // CHROME_BROWSER_ASH_WEB_APPLICATIONS_FIRMWARE_UPDATE_SYSTEM_WEB_APP_INFO_H_
diff --git a/chrome/browser/ash/web_applications/help_app/help_app_web_app_info.cc b/chrome/browser/ash/web_applications/help_app/help_app_web_app_info.cc
index 7e553d3..0c766185 100644
--- a/chrome/browser/ash/web_applications/help_app/help_app_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/help_app/help_app_web_app_info.cc
@@ -23,9 +23,9 @@
constexpr gfx::Size HELP_DEFAULT_SIZE(960, 600);
} // namespace

-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForHelpWebApp() {
- std::unique_ptr<WebApplicationInfo> info =
- std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForHelpWebApp() {
+ std::unique_ptr<WebAppInstallInfo> info =
+ std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(kChromeUIHelpAppURL);
info->scope = GURL(kChromeUIHelpAppURL);

@@ -86,7 +86,7 @@
}
}

-std::unique_ptr<WebApplicationInfo> HelpAppSystemAppDelegate::GetWebAppInfo()
+std::unique_ptr<WebAppInstallInfo> HelpAppSystemAppDelegate::GetWebAppInfo()
const {
return CreateWebAppInfoForHelpWebApp();
}
diff --git a/chrome/browser/ash/web_applications/help_app/help_app_web_app_info.h b/chrome/browser/ash/web_applications/help_app/help_app_web_app_info.h
index 385bd2b..a3afa87 100644
--- a/chrome/browser/ash/web_applications/help_app/help_app_web_app_info.h
+++ b/chrome/browser/ash/web_applications/help_app/help_app_web_app_info.h
@@ -15,7 +15,7 @@
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;
class Browser;

namespace ash {
@@ -25,7 +25,7 @@
explicit HelpAppSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
gfx::Rect GetDefaultBounds(Browser*) const override;
gfx::Size GetMinimumWindowSize() const override;
std::vector<int> GetAdditionalSearchTerms() const override;
@@ -34,8 +34,8 @@
bool ShouldCaptureNavigations() const override;
};

-// Return a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForHelpWebApp();
+// Return a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForHelpWebApp();

// Returns the default bounds.
gfx::Rect GetDefaultBoundsForHelpApp(Browser*);
diff --git a/chrome/browser/ash/web_applications/media_app/media_web_app_info.cc b/chrome/browser/ash/web_applications/media_app/media_web_app_info.cc
index 1d65ebc..3ad0f65 100644
--- a/chrome/browser/ash/web_applications/media_app/media_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/media_app/media_web_app_info.cc
@@ -86,7 +86,7 @@
};

// Converts a FileHandlerConfig constexpr into the type needed to populate the
-// WebApplicationInfo's `accept` property.
+// WebAppInstallInfo's `accept` property.
std::vector<apps::FileHandler::AcceptEntry> MakeFileHandlerAccept(
base::span<const FileHandlerConfig> config) {
std::vector<apps::FileHandler::AcceptEntry> result;
@@ -116,9 +116,9 @@
{{web_app::GetOrigin("chrome://media-app"), {"FileHandling"}}})) {
}

-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForMediaWebApp() {
- std::unique_ptr<WebApplicationInfo> info =
- std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForMediaWebApp() {
+ std::unique_ptr<WebAppInstallInfo> info =
+ std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(ash::kChromeUIMediaAppURL);
info->scope = GURL(ash::kChromeUIMediaAppURL);

@@ -157,7 +157,7 @@
return info;
}

-std::unique_ptr<WebApplicationInfo> MediaSystemAppDelegate::GetWebAppInfo()
+std::unique_ptr<WebAppInstallInfo> MediaSystemAppDelegate::GetWebAppInfo()
const {
return CreateWebAppInfoForMediaWebApp();
}
diff --git a/chrome/browser/ash/web_applications/media_app/media_web_app_info.h b/chrome/browser/ash/web_applications/media_app/media_web_app_info.h
index 72615c0b..81707e7 100644
--- a/chrome/browser/ash/web_applications/media_app/media_web_app_info.h
+++ b/chrome/browser/ash/web_applications/media_app/media_web_app_info.h
@@ -8,14 +8,14 @@
#include "chrome/browser/web_applications/system_web_apps/system_web_app_delegate.h"
#include "chrome/browser/web_applications/system_web_apps/system_web_app_types.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

class MediaSystemAppDelegate : public web_app::SystemWebAppDelegate {
public:
explicit MediaSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool ShouldShowInLauncher() const override;
bool ShouldCaptureNavigations() const override;
bool ShouldShowInSearch() const override;
@@ -26,7 +26,7 @@
const apps::AppLaunchParams& params) const override;
};

-// Return a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForMediaWebApp();
+// Return a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForMediaWebApp();

#endif // CHROME_BROWSER_ASH_WEB_APPLICATIONS_MEDIA_APP_MEDIA_WEB_APP_INFO_H_
diff --git a/chrome/browser/ash/web_applications/os_feedback_system_web_app_info.cc b/chrome/browser/ash/web_applications/os_feedback_system_web_app_info.cc
index f7d486f..b94a0fd 100644
--- a/chrome/browser/ash/web_applications/os_feedback_system_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/os_feedback_system_web_app_info.cc
@@ -23,9 +23,8 @@
constexpr int kFeedbackAppDefaultHeight = 640;
} // namespace

-std::unique_ptr<WebApplicationInfo>
-CreateWebAppInfoForOSFeedbackSystemWebApp() {
- auto info = std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForOSFeedbackSystemWebApp() {
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(ash::kChromeUIOSFeedbackUrl);
info->scope = GURL(ash::kChromeUIOSFeedbackUrl);
info->title = l10n_util::GetStringUTF16(IDS_FEEDBACK_REPORT_APP_TITLE);
@@ -56,7 +55,7 @@
GURL(ash::kChromeUIOSFeedbackUrl),
profile) {}

-std::unique_ptr<WebApplicationInfo> OSFeedbackAppDelegate::GetWebAppInfo()
+std::unique_ptr<WebAppInstallInfo> OSFeedbackAppDelegate::GetWebAppInfo()
const {
return CreateWebAppInfoForOSFeedbackSystemWebApp();
}
diff --git a/chrome/browser/ash/web_applications/os_feedback_system_web_app_info.h b/chrome/browser/ash/web_applications/os_feedback_system_web_app_info.h
index df2aa0aa..18cde2561 100644
--- a/chrome/browser/ash/web_applications/os_feedback_system_web_app_info.h
+++ b/chrome/browser/ash/web_applications/os_feedback_system_web_app_info.h
@@ -13,14 +13,14 @@
#include "ui/gfx/geometry/rect.h"

class Browser;
-struct WebApplicationInfo;
+struct WebAppInstallInfo;

class OSFeedbackAppDelegate : public web_app::SystemWebAppDelegate {
public:
explicit OSFeedbackAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool IsAppEnabled() const override;
bool ShouldAllowScriptsToCloseWindows() const override;
bool ShouldCaptureNavigations() const override;
@@ -29,8 +29,8 @@
gfx::Rect GetDefaultBounds(Browser*) const override;
};

-// Returns a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForOSFeedbackSystemWebApp();
+// Returns a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForOSFeedbackSystemWebApp();

// Returns the default bounds.
gfx::Rect GetDefaultBoundsForOSFeedbackApp(Browser*);
diff --git a/chrome/browser/ash/web_applications/os_flags_system_web_app_info.cc b/chrome/browser/ash/web_applications/os_flags_system_web_app_info.cc
index 15f3a2f..3d5f4ef 100644
--- a/chrome/browser/ash/web_applications/os_flags_system_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/os_flags_system_web_app_info.cc
@@ -33,9 +33,9 @@

OsFlagsSystemWebAppDelegate::~OsFlagsSystemWebAppDelegate() = default;

-std::unique_ptr<WebApplicationInfo> OsFlagsSystemWebAppDelegate::GetWebAppInfo()
+std::unique_ptr<WebAppInstallInfo> OsFlagsSystemWebAppDelegate::GetWebAppInfo()
const {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(chrome::kChromeUIFlagsURL);
info->scope = GURL(chrome::kChromeUIFlagsURL);

diff --git a/chrome/browser/ash/web_applications/os_flags_system_web_app_info.h b/chrome/browser/ash/web_applications/os_flags_system_web_app_info.h
index 5363453..40d80752 100644
--- a/chrome/browser/ash/web_applications/os_flags_system_web_app_info.h
+++ b/chrome/browser/ash/web_applications/os_flags_system_web_app_info.h
@@ -22,7 +22,7 @@
~OsFlagsSystemWebAppDelegate() override;

// web_app::SystemWebAppDelegate:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;

// TODO(crbug/1260386) - Add override for GetAdditionalSearchTerms() to allow
// capturing the os:// search tearms to be used.
diff --git a/chrome/browser/ash/web_applications/os_settings_web_app_info.cc b/chrome/browser/ash/web_applications/os_settings_web_app_info.cc
index 90a8c16..a4373bf 100644
--- a/chrome/browser/ash/web_applications/os_settings_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/os_settings_web_app_info.cc
@@ -30,10 +30,9 @@

} // namespace

-std::unique_ptr<WebApplicationInfo>
-CreateWebAppInfoForOSSettingsSystemWebApp() {
- std::unique_ptr<WebApplicationInfo> info =
- std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForOSSettingsSystemWebApp() {
+ std::unique_ptr<WebAppInstallInfo> info =
+ std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(chrome::kChromeUIOSSettingsURL);
info->scope = GURL(chrome::kChromeUIOSSettingsURL);
info->title = l10n_util::GetStringUTF16(IDS_SETTINGS_SETTINGS);
@@ -59,7 +58,7 @@
GURL(chrome::kChromeUISettingsURL),
profile) {}

-std::unique_ptr<WebApplicationInfo> OSSettingsSystemAppDelegate::GetWebAppInfo()
+std::unique_ptr<WebAppInstallInfo> OSSettingsSystemAppDelegate::GetWebAppInfo()
const {
return CreateWebAppInfoForOSSettingsSystemWebApp();
}
diff --git a/chrome/browser/ash/web_applications/os_settings_web_app_info.h b/chrome/browser/ash/web_applications/os_settings_web_app_info.h
index 890fc44..7d18bd9 100644
--- a/chrome/browser/ash/web_applications/os_settings_web_app_info.h
+++ b/chrome/browser/ash/web_applications/os_settings_web_app_info.h
@@ -13,20 +13,20 @@
#include "chrome/common/webui_url_constants.h"
#include "ui/gfx/geometry/rect.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

class OSSettingsSystemAppDelegate : public web_app::SystemWebAppDelegate {
public:
explicit OSSettingsSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool ShouldCaptureNavigations() const override;
gfx::Size GetMinimumWindowSize() const override;
std::vector<web_app::AppId> GetAppIdsToUninstallAndReplace() const override;
};

-// Return a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForOSSettingsSystemWebApp();
+// Return a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForOSSettingsSystemWebApp();

#endif // CHROME_BROWSER_ASH_WEB_APPLICATIONS_OS_SETTINGS_WEB_APP_INFO_H_
diff --git a/chrome/browser/ash/web_applications/os_url_handler_system_web_app_info.cc b/chrome/browser/ash/web_applications/os_url_handler_system_web_app_info.cc
index 54ef592..13a6941 100644
--- a/chrome/browser/ash/web_applications/os_url_handler_system_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/os_url_handler_system_web_app_info.cc
@@ -40,9 +40,9 @@

OsUrlHandlerSystemWebAppDelegate::~OsUrlHandlerSystemWebAppDelegate() = default;

-std::unique_ptr<WebApplicationInfo>
+std::unique_ptr<WebAppInstallInfo>
OsUrlHandlerSystemWebAppDelegate::GetWebAppInfo() const {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(chrome::kChromeUIOsUrlAppURL);
info->scope = GURL(chrome::kChromeUIOsUrlAppURL);
info->title = l10n_util::GetStringUTF16(IDS_OS_URL_HANDLER_APP_NAME);
diff --git a/chrome/browser/ash/web_applications/os_url_handler_system_web_app_info.h b/chrome/browser/ash/web_applications/os_url_handler_system_web_app_info.h
index a313bbc0..bc3394c 100644
--- a/chrome/browser/ash/web_applications/os_url_handler_system_web_app_info.h
+++ b/chrome/browser/ash/web_applications/os_url_handler_system_web_app_info.h
@@ -23,7 +23,7 @@
~OsUrlHandlerSystemWebAppDelegate() override;

// web_app::SystemWebAppDelegate:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;

// TODO(crbug/1260386) - Add override for GetAdditionalSearchTerms() to allow
// capturing the os:// search tearms to be used.
diff --git a/chrome/browser/ash/web_applications/personalization_app/personalization_app_info.cc b/chrome/browser/ash/web_applications/personalization_app/personalization_app_info.cc
index bbdaa89..018e0d4 100644
--- a/chrome/browser/ash/web_applications/personalization_app/personalization_app_info.cc
+++ b/chrome/browser/ash/web_applications/personalization_app/personalization_app_info.cc
@@ -15,9 +15,9 @@
#include "third_party/blink/public/mojom/manifest/display_mode.mojom.h"
#include "ui/base/l10n/l10n_util.h"

-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForPersonalizationApp() {
- std::unique_ptr<WebApplicationInfo> info =
- std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForPersonalizationApp() {
+ std::unique_ptr<WebAppInstallInfo> info =
+ std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(ash::kChromeUIPersonalizationAppURL);
info->scope = GURL(ash::kChromeUIPersonalizationAppURL);
info->title = l10n_util::GetStringUTF16(IDS_PERSONALIZATION_APP_TITLE);
@@ -38,7 +38,7 @@
GURL(ash::kChromeUIPersonalizationAppURL),
profile) {}

-std::unique_ptr<WebApplicationInfo>
+std::unique_ptr<WebAppInstallInfo>
PersonalizationSystemAppDelegate::GetWebAppInfo() const {
return CreateWebAppInfoForPersonalizationApp();
}
diff --git a/chrome/browser/ash/web_applications/personalization_app/personalization_app_info.h b/chrome/browser/ash/web_applications/personalization_app/personalization_app_info.h
index 98ac704..63a377cad 100644
--- a/chrome/browser/ash/web_applications/personalization_app/personalization_app_info.h
+++ b/chrome/browser/ash/web_applications/personalization_app/personalization_app_info.h
@@ -8,20 +8,20 @@
#include "ash/webui/personalization_app/personalization_app_url_constants.h"
#include "chrome/browser/web_applications/system_web_apps/system_web_app_delegate.h"
#include "chrome/browser/web_applications/system_web_apps/system_web_app_types.h"
-struct WebApplicationInfo;
+struct WebAppInstallInfo;

class PersonalizationSystemAppDelegate : public web_app::SystemWebAppDelegate {
public:
explicit PersonalizationSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool ShouldCaptureNavigations() const override;
bool IsAppEnabled() const override;
bool ShouldShowInLauncher() const override;
};

-// Return a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForPersonalizationApp();
+// Return a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForPersonalizationApp();

#endif // CHROME_BROWSER_ASH_WEB_APPLICATIONS_PERSONALIZATION_APP_PERSONALIZATION_APP_INFO_H_
diff --git a/chrome/browser/ash/web_applications/print_management_web_app_info.cc b/chrome/browser/ash/web_applications/print_management_web_app_info.cc
index 13c987b..5658574 100644
--- a/chrome/browser/ash/web_applications/print_management_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/print_management_web_app_info.cc
@@ -14,9 +14,9 @@
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"

-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForPrintManagementApp() {
- std::unique_ptr<WebApplicationInfo> info =
- std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForPrintManagementApp() {
+ std::unique_ptr<WebAppInstallInfo> info =
+ std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(ash::kChromeUIPrintManagementAppUrl);
info->scope = GURL(ash::kChromeUIPrintManagementAppUrl);
info->title = l10n_util::GetStringUTF16(IDS_PRINT_MANAGEMENT_TITLE);
@@ -43,7 +43,7 @@
GURL("chrome://print-management/pwa.html"),
profile) {}

-std::unique_ptr<WebApplicationInfo>
+std::unique_ptr<WebAppInstallInfo>
PrintManagementSystemAppDelegate::GetWebAppInfo() const {
return CreateWebAppInfoForPrintManagementApp();
}
diff --git a/chrome/browser/ash/web_applications/print_management_web_app_info.h b/chrome/browser/ash/web_applications/print_management_web_app_info.h
index f42bb2c..3f08e75 100644
--- a/chrome/browser/ash/web_applications/print_management_web_app_info.h
+++ b/chrome/browser/ash/web_applications/print_management_web_app_info.h
@@ -9,19 +9,19 @@
#include "chrome/browser/web_applications/system_web_apps/system_web_app_types.h"
#include "ui/gfx/geometry/size.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

class PrintManagementSystemAppDelegate : public web_app::SystemWebAppDelegate {
public:
explicit PrintManagementSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool ShouldShowInLauncher() const override;
gfx::Size GetMinimumWindowSize() const override;
};

-// Returns a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForPrintManagementApp();
+// Returns a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForPrintManagementApp();

#endif // CHROME_BROWSER_ASH_WEB_APPLICATIONS_PRINT_MANAGEMENT_WEB_APP_INFO_H_
diff --git a/chrome/browser/ash/web_applications/projector_system_web_app_info.cc b/chrome/browser/ash/web_applications/projector_system_web_app_info.cc
index 5286135..2016676b 100644
--- a/chrome/browser/ash/web_applications/projector_system_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/projector_system_web_app_info.cc
@@ -35,9 +35,9 @@

ProjectorSystemWebAppDelegate::~ProjectorSystemWebAppDelegate() = default;

-std::unique_ptr<WebApplicationInfo>
+std::unique_ptr<WebAppInstallInfo>
ProjectorSystemWebAppDelegate::GetWebAppInfo() const {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(ash::kChromeUITrustedProjectorAppUrl);
info->scope = GURL(ash::kChromeUITrustedProjectorAppUrl);

diff --git a/chrome/browser/ash/web_applications/projector_system_web_app_info.h b/chrome/browser/ash/web_applications/projector_system_web_app_info.h
index 02f5c902..7b3dff7 100644
--- a/chrome/browser/ash/web_applications/projector_system_web_app_info.h
+++ b/chrome/browser/ash/web_applications/projector_system_web_app_info.h
@@ -18,7 +18,7 @@
~ProjectorSystemWebAppDelegate() override;

// web_app::SystemWebAppDelegate:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool ShouldCaptureNavigations() const override;
bool IsAppEnabled() const override;
};
diff --git a/chrome/browser/ash/web_applications/sample_system_web_app_info.cc b/chrome/browser/ash/web_applications/sample_system_web_app_info.cc
index 1834314..7f24995 100644
--- a/chrome/browser/ash/web_applications/sample_system_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/sample_system_web_app_info.cc
@@ -14,9 +14,9 @@
#include "chrome/browser/web_applications/web_application_info.h"
#include "third_party/blink/public/mojom/manifest/display_mode.mojom.h"

-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForSampleSystemWebApp() {
- std::unique_ptr<WebApplicationInfo> info =
- std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForSampleSystemWebApp() {
+ std::unique_ptr<WebAppInstallInfo> info =
+ std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(ash::kChromeUISampleSystemWebAppURL);
info->scope = GURL(ash::kChromeUISampleSystemWebAppURL);
// |title| should come from a resource string, but this is the sample app, and
@@ -68,7 +68,7 @@
{web_app::GetOrigin("chrome-untrusted://sample-system-web-app"),
{"Frobulate"}}})) {}

-std::unique_ptr<WebApplicationInfo> SampleSystemAppDelegate::GetWebAppInfo()
+std::unique_ptr<WebAppInstallInfo> SampleSystemAppDelegate::GetWebAppInfo()
const {
return CreateWebAppInfoForSampleSystemWebApp();
}
diff --git a/chrome/browser/ash/web_applications/sample_system_web_app_info.h b/chrome/browser/ash/web_applications/sample_system_web_app_info.h
index 482d8148..cda31c0 100644
--- a/chrome/browser/ash/web_applications/sample_system_web_app_info.h
+++ b/chrome/browser/ash/web_applications/sample_system_web_app_info.h
@@ -9,7 +9,7 @@
#include "chrome/browser/web_applications/system_web_apps/system_web_app_delegate.h"
#include "chrome/browser/web_applications/system_web_apps/system_web_app_types.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

#if defined(OFFICIAL_BUILD)
#error Demo Mode should only be included in unofficial builds.
@@ -20,7 +20,7 @@
explicit SampleSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool ShouldCaptureNavigations() const override;
bool ShouldReuseExistingWindow() const override;
bool ShouldShowNewWindowMenuOption() const override;
@@ -28,7 +28,7 @@
const override;
};

-// Return a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForSampleSystemWebApp();
+// Return a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForSampleSystemWebApp();

#endif // CHROME_BROWSER_ASH_WEB_APPLICATIONS_SAMPLE_SYSTEM_WEB_APP_INFO_H_
diff --git a/chrome/browser/ash/web_applications/scanning_system_web_app_info.cc b/chrome/browser/ash/web_applications/scanning_system_web_app_info.cc
index d98ad7dd..1486068 100644
--- a/chrome/browser/ash/web_applications/scanning_system_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/scanning_system_web_app_info.cc
@@ -15,9 +15,9 @@
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"

-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForScanningSystemWebApp() {
- std::unique_ptr<WebApplicationInfo> info =
- std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForScanningSystemWebApp() {
+ std::unique_ptr<WebAppInstallInfo> info =
+ std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(ash::kChromeUIScanningAppUrl);
info->scope = GURL(ash::kChromeUIScanningAppUrl);
info->title = l10n_util::GetStringUTF16(IDS_SCANNING_APP_TITLE);
@@ -51,7 +51,7 @@
GURL("chrome://scanning"),
profile) {}

-std::unique_ptr<WebApplicationInfo> ScanningSystemAppDelegate::GetWebAppInfo()
+std::unique_ptr<WebAppInstallInfo> ScanningSystemAppDelegate::GetWebAppInfo()
const {
return CreateWebAppInfoForScanningSystemWebApp();
}
diff --git a/chrome/browser/ash/web_applications/scanning_system_web_app_info.h b/chrome/browser/ash/web_applications/scanning_system_web_app_info.h
index 4fe1024..9da02b4b 100644
--- a/chrome/browser/ash/web_applications/scanning_system_web_app_info.h
+++ b/chrome/browser/ash/web_applications/scanning_system_web_app_info.h
@@ -9,20 +9,20 @@
#include "chrome/browser/web_applications/system_web_apps/system_web_app_types.h"
#include "ui/gfx/geometry/size.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

class ScanningSystemAppDelegate : public web_app::SystemWebAppDelegate {
public:
explicit ScanningSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool ShouldShowInLauncher() const override;
bool ShouldCaptureNavigations() const override;
gfx::Size GetMinimumWindowSize() const override;
};

-// Returns a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForScanningSystemWebApp();
+// Returns a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForScanningSystemWebApp();

#endif // CHROME_BROWSER_ASH_WEB_APPLICATIONS_SCANNING_SYSTEM_WEB_APP_INFO_H_
diff --git a/chrome/browser/ash/web_applications/shimless_rma_system_web_app_info.cc b/chrome/browser/ash/web_applications/shimless_rma_system_web_app_info.cc
index 48cd0a2..a1b6126 100644
--- a/chrome/browser/ash/web_applications/shimless_rma_system_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/shimless_rma_system_web_app_info.cc
@@ -15,9 +15,9 @@
#include "third_party/blink/public/mojom/manifest/display_mode.mojom.h"
#include "ui/base/l10n/l10n_util.h"

-std::unique_ptr<WebApplicationInfo>
+std::unique_ptr<WebAppInstallInfo>
CreateWebAppInfoForShimlessRMASystemWebApp() {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(ash::kChromeUIShimlessRMAUrl);
info->scope = GURL(ash::kChromeUIShimlessRMAUrl);
info->title = l10n_util::GetStringUTF16(IDS_ASH_SHIMLESS_RMA_APP_TITLE);
@@ -39,8 +39,8 @@
GURL(ash::kChromeUIShimlessRMAUrl),
profile) {}

-std::unique_ptr<WebApplicationInfo>
-ShimlessRMASystemAppDelegate::GetWebAppInfo() const {
+std::unique_ptr<WebAppInstallInfo> ShimlessRMASystemAppDelegate::GetWebAppInfo()
+ const {
return CreateWebAppInfoForShimlessRMASystemWebApp();
}

diff --git a/chrome/browser/ash/web_applications/shimless_rma_system_web_app_info.h b/chrome/browser/ash/web_applications/shimless_rma_system_web_app_info.h
index 86cc3f4..6add399 100644
--- a/chrome/browser/ash/web_applications/shimless_rma_system_web_app_info.h
+++ b/chrome/browser/ash/web_applications/shimless_rma_system_web_app_info.h
@@ -10,14 +10,14 @@
#include "chrome/browser/web_applications/system_web_apps/system_web_app_types.h"
#include "ui/gfx/geometry/size.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

class ShimlessRMASystemAppDelegate : public web_app::SystemWebAppDelegate {
public:
explicit ShimlessRMASystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool ShouldCaptureNavigations() const override;
bool ShouldShowInLauncher() const override;
bool ShouldShowInSearch() const override;
@@ -26,8 +26,7 @@
bool IsAppEnabled() const override;
};

-// Returns a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo>
-CreateWebAppInfoForShimlessRMASystemWebApp();
+// Returns a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForShimlessRMASystemWebApp();

#endif // CHROME_BROWSER_ASH_WEB_APPLICATIONS_SHIMLESS_RMA_SYSTEM_WEB_APP_INFO_H_
diff --git a/chrome/browser/ash/web_applications/shortcut_customization_system_web_app_info.cc b/chrome/browser/ash/web_applications/shortcut_customization_system_web_app_info.cc
index c5be6c8..8da7552 100644
--- a/chrome/browser/ash/web_applications/shortcut_customization_system_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/shortcut_customization_system_web_app_info.cc
@@ -16,9 +16,9 @@
#include "ui/base/ui_base_features.h"

// TODO(jimmyxgong): Update to correct icon and app sizes.
-std::unique_ptr<WebApplicationInfo>
+std::unique_ptr<WebAppInstallInfo>
CreateWebAppInfoForShortcutCustomizationSystemWebApp() {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(ash::kChromeUIShortcutCustomizationAppURL);
info->scope = GURL(ash::kChromeUIShortcutCustomizationAppURL);
info->title =
@@ -48,7 +48,7 @@
GURL(ash::kChromeUIShortcutCustomizationAppURL),
profile) {}

-std::unique_ptr<WebApplicationInfo>
+std::unique_ptr<WebAppInstallInfo>
ShortcutCustomizationSystemAppDelegate::GetWebAppInfo() const {
return CreateWebAppInfoForShortcutCustomizationSystemWebApp();
}
diff --git a/chrome/browser/ash/web_applications/shortcut_customization_system_web_app_info.h b/chrome/browser/ash/web_applications/shortcut_customization_system_web_app_info.h
index e46e2304..736c1c9 100644
--- a/chrome/browser/ash/web_applications/shortcut_customization_system_web_app_info.h
+++ b/chrome/browser/ash/web_applications/shortcut_customization_system_web_app_info.h
@@ -10,7 +10,7 @@
#include "chrome/browser/web_applications/system_web_apps/system_web_app_types.h"
#include "ui/gfx/geometry/size.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

class ShortcutCustomizationSystemAppDelegate
: public web_app::SystemWebAppDelegate {
@@ -18,12 +18,12 @@
explicit ShortcutCustomizationSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
gfx::Size GetMinimumWindowSize() const override;
bool IsAppEnabled() const override;
};
-// Returns a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo>
+// Returns a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo>
CreateWebAppInfoForShortcutCustomizationSystemWebApp();

#endif // CHROME_BROWSER_ASH_WEB_APPLICATIONS_SHORTCUT_CUSTOMIZATION_SYSTEM_WEB_APP_INFO_H_
diff --git a/chrome/browser/ash/web_applications/system_web_app_install_utils.cc b/chrome/browser/ash/web_applications/system_web_app_install_utils.cc
index 3d1070c..c2a5ad0 100644
--- a/chrome/browser/ash/web_applications/system_web_app_install_utils.cc
+++ b/chrome/browser/ash/web_applications/system_web_app_install_utils.cc
@@ -15,7 +15,7 @@
void CreateIconInfoForSystemWebApp(
const GURL& app_url,
const std::initializer_list<IconResourceInfo>& manifest_icons,
- WebApplicationInfo& web_app) {
+ WebAppInstallInfo& web_app) {
for (const auto& info : manifest_icons) {
web_app.manifest_icons.emplace_back(app_url.Resolve(info.icon_name),
info.size);
diff --git a/chrome/browser/ash/web_applications/system_web_app_install_utils.h b/chrome/browser/ash/web_applications/system_web_app_install_utils.h
index 4320a4c..6908fd6 100644
--- a/chrome/browser/ash/web_applications/system_web_app_install_utils.h
+++ b/chrome/browser/ash/web_applications/system_web_app_install_utils.h
@@ -26,7 +26,7 @@
void CreateIconInfoForSystemWebApp(
const GURL& app_url,
const std::initializer_list<IconResourceInfo>& manifest_icons,
- WebApplicationInfo& web_app);
+ WebAppInstallInfo& web_app);

// Get correct ChromeOS background color based on if dark mode is requested and
// if kSemanticColorsDebugOverride is enabled.
diff --git a/chrome/browser/ash/web_applications/terminal_system_web_app_info.cc b/chrome/browser/ash/web_applications/terminal_system_web_app_info.cc
index d96d608..6160069 100644
--- a/chrome/browser/ash/web_applications/terminal_system_web_app_info.cc
+++ b/chrome/browser/ash/web_applications/terminal_system_web_app_info.cc
@@ -31,8 +31,8 @@
constexpr gfx::Size TERMINAL_SETTINGS_DEFAULT_SIZE(768, 512);
} // namespace

-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForTerminalSystemWebApp() {
- auto info = std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForTerminalSystemWebApp() {
+ auto info = std::make_unique<WebAppInstallInfo>();
// URL used for crostini::kCrostiniTerminalSystemAppId.
const GURL terminal_url("chrome-untrusted://terminal/html/terminal.html");
info->start_url = terminal_url;
@@ -72,7 +72,7 @@
GURL(chrome::kChromeUIUntrustedTerminalURL),
profile) {}

-std::unique_ptr<WebApplicationInfo> TerminalSystemAppDelegate::GetWebAppInfo()
+std::unique_ptr<WebAppInstallInfo> TerminalSystemAppDelegate::GetWebAppInfo()
const {
return CreateWebAppInfoForTerminalSystemWebApp();
}
diff --git a/chrome/browser/ash/web_applications/terminal_system_web_app_info.h b/chrome/browser/ash/web_applications/terminal_system_web_app_info.h
index 37e7985..cdee2be 100644
--- a/chrome/browser/ash/web_applications/terminal_system_web_app_info.h
+++ b/chrome/browser/ash/web_applications/terminal_system_web_app_info.h
@@ -12,7 +12,7 @@
#include "chrome/common/webui_url_constants.h"
#include "ui/gfx/geometry/rect.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;
class Browser;

class TerminalSystemAppDelegate : public web_app::SystemWebAppDelegate {
@@ -20,7 +20,7 @@
explicit TerminalSystemAppDelegate(Profile* profile);

// web_app::SystemWebAppDelegate overrides:
- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;
bool ShouldReuseExistingWindow() const override;
bool ShouldShowNewWindowMenuOption() const override;
bool ShouldHaveTabStrip() const override;
@@ -33,8 +33,8 @@
int command_id) const override;
};

-// Returns a WebApplicationInfo used to install the app.
-std::unique_ptr<WebApplicationInfo> CreateWebAppInfoForTerminalSystemWebApp();
+// Returns a WebAppInstallInfo used to install the app.
+std::unique_ptr<WebAppInstallInfo> CreateWebAppInfoForTerminalSystemWebApp();

// Returns the default bounds.
gfx::Rect GetDefaultBoundsForTerminal(Browser* browser);
diff --git a/chrome/browser/extensions/api/crash_report_private/crash_report_private_apitest.cc b/chrome/browser/extensions/api/crash_report_private/crash_report_private_apitest.cc
index f6801c4d..a237fe3e 100644
--- a/chrome/browser/extensions/api/crash_report_private/crash_report_private_apitest.cc
+++ b/chrome/browser/extensions/api/crash_report_private/crash_report_private_apitest.cc
@@ -326,7 +326,7 @@
ASSERT_TRUE(embedded_test_server()->Started());
// Create and launch a test web app, opens in an app window.
GURL start_url = embedded_test_server()->GetURL("/test_app.html");
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app::AppId app_id =
web_app::test::InstallWebApp(profile(), std::move(web_app_info));
diff --git a/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc b/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc
index 33eb06db..84a51b8 100644
--- a/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc
+++ b/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc
@@ -261,7 +261,7 @@
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->title = base::UTF8ToUTF16(title);
web_app_info->start_url = launch_url;
web_app_info->display_mode = web_app::DisplayMode::kBrowser;
diff --git a/chrome/browser/lacros/standalone_browser_test_controller.cc b/chrome/browser/lacros/standalone_browser_test_controller.cc
index 8eb15c5..a6e1228 100644
--- a/chrome/browser/lacros/standalone_browser_test_controller.cc
+++ b/chrome/browser/lacros/standalone_browser_test_controller.cc
@@ -41,7 +41,7 @@
const std::string& start_url,
apps::mojom::WindowMode window_mode,
InstallWebAppCallback callback) {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->title = u"Test Web App";
info->start_url = GURL(start_url);
info->display_mode = WindowModeToDisplayMode(window_mode);
diff --git a/chrome/browser/notifications/chrome_ash_message_center_client_browsertest.cc b/chrome/browser/notifications/chrome_ash_message_center_client_browsertest.cc
index f3dca47b..45281a1 100644
--- a/chrome/browser/notifications/chrome_ash_message_center_client_browsertest.cc
+++ b/chrome/browser/notifications/chrome_ash_message_center_client_browsertest.cc
@@ -66,7 +66,7 @@
}

std::string InstallTestPWA() {
- auto web_application_info = std::make_unique<WebApplicationInfo>();
+ auto web_application_info = std::make_unique<WebAppInstallInfo>();
web_application_info->start_url = GURL(kUrlString);
web_application_info->display_mode = blink::mojom::DisplayMode::kMinimalUi;
Profile* profile = browser()->profile();
diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc b/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc
index 8d8dc5d..c9a8418 100644
--- a/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc
+++ b/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc
@@ -2042,7 +2042,7 @@
}

Browser* InstallAndLaunchPWA(const GURL& start_url) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.DeprecatedGetOriginAsURL();
web_app_info->user_display_mode = blink::mojom::DisplayMode::kStandalone;
diff --git a/chrome/browser/policy/test/system_features_policy_browsertest.cc b/chrome/browser/policy/test/system_features_policy_browsertest.cc
index 85c0a9ca..695f27e 100644
--- a/chrome/browser/policy/test/system_features_policy_browsertest.cc
+++ b/chrome/browser/policy/test/system_features_policy_browsertest.cc
@@ -143,7 +143,7 @@
}

void InstallPWA(const GURL& app_url, const char* app_id) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = app_url;
web_app_info->scope = app_url.GetWithoutFilename();
web_app::AppId installed_app_id = web_app::test::InstallWebApp(
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc
index b3fd3b8..c13e75b 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc
@@ -232,7 +232,7 @@
}

AppId InstallTestWebApp(const GURL& start_url, bool open_as_window = true) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url;
web_app_info->title = u"Test app 🐐";
diff --git a/chrome/browser/sessions/session_restore_browsertest.cc b/chrome/browser/sessions/session_restore_browsertest.cc
index bd34a90..b1f446e 100644
--- a/chrome/browser/sessions/session_restore_browsertest.cc
+++ b/chrome/browser/sessions/session_restore_browsertest.cc
@@ -3209,7 +3209,7 @@
}

web_app::AppId InstallPWA(Profile* profile, const GURL& start_url) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
web_app_info->user_display_mode = blink::mojom::DisplayMode::kStandalone;
diff --git a/chrome/browser/ssl/ssl_browsertest.cc b/chrome/browser/ssl/ssl_browsertest.cc
index 9bafc48..6dc3e8d37 100644
--- a/chrome/browser/ssl/ssl_browsertest.cc
+++ b/chrome/browser/ssl/ssl_browsertest.cc
@@ -836,7 +836,7 @@
}

Browser* InstallAndOpenTestWebApp(const GURL& start_url) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
web_app_info->title = u"Test app";
diff --git a/chrome/browser/sync/test/integration/apps_helper.cc b/chrome/browser/sync/test/integration/apps_helper.cc
index 8d1ca92..2b35787 100644
--- a/chrome/browser/sync/test/integration/apps_helper.cc
+++ b/chrome/browser/sync/test/integration/apps_helper.cc
@@ -222,13 +222,13 @@
}
}

-web_app::AppId InstallWebApp(Profile* profile, const WebApplicationInfo& info) {
+web_app::AppId InstallWebApp(Profile* profile, const WebAppInstallInfo& info) {
DCHECK(info.start_url.is_valid());
base::RunLoop run_loop;
web_app::AppId app_id;
auto* provider = web_app::WebAppProvider::GetForTest(profile);
provider->install_manager().InstallWebAppFromInfo(
- std::make_unique<WebApplicationInfo>(info),
+ std::make_unique<WebAppInstallInfo>(info),
/*overwrite_existing_manifest_fields=*/true,
web_app::ForInstallableSite::kYes,
webapps::WebappInstallSource::OMNIBOX_INSTALL_ICON,
diff --git a/chrome/browser/sync/test/integration/apps_helper.h b/chrome/browser/sync/test/integration/apps_helper.h
index 70fe2a1..8da5454 100644
--- a/chrome/browser/sync/test/integration/apps_helper.h
+++ b/chrome/browser/sync/test/integration/apps_helper.h
@@ -47,9 +47,9 @@
// verifier), and returns the extension ID of the new app.
std::string InstallHostedAppForAllProfiles(int index);

-// Installs the web app for the given WebApplicationInfo and profile. This does
+// Installs the web app for the given WebAppInstallInfo and profile. This does
// not download icons or run OS integration installs.
-web_app::AppId InstallWebApp(Profile* profile, const WebApplicationInfo& info);
+web_app::AppId InstallWebApp(Profile* profile, const WebAppInstallInfo& info);

// Uninstalls the app for the given index from |profile|. Assumes that it was
// previously installed.
diff --git a/chrome/browser/sync/test/integration/single_client_web_apps_sync_test.cc b/chrome/browser/sync/test/integration/single_client_web_apps_sync_test.cc
index 420d901..8789d22 100644
--- a/chrome/browser/sync/test/integration/single_client_web_apps_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_web_apps_sync_test.cc
@@ -192,7 +192,7 @@
IN_PROC_BROWSER_TEST_F(SingleClientWebAppsSyncTest,
AppInstallDoNotSyncBookmarkApp) {
ASSERT_TRUE(SetupSync());
- WebApplicationInfo info;
+ WebAppInstallInfo info;
std::string name = "Test name";
info.title = base::UTF8ToUTF16(name);
info.description = u"Test description";
@@ -237,7 +237,7 @@

EXPECT_TRUE(web_app_registrar.IsInstalled(app_id));

- WebApplicationInfo info;
+ WebAppInstallInfo info;
std::string name = "Test name";
info.title = base::UTF8ToUTF16(app_id);
info.description = u"Test description";
@@ -267,7 +267,7 @@

EXPECT_TRUE(web_app_registrar.IsInstalled(app_id));

- WebApplicationInfo info;
+ WebAppInstallInfo info;
std::string name = "Test name";
info.title = base::UTF8ToUTF16(app_id);
info.description = u"Test description";
diff --git a/chrome/browser/sync/test/integration/two_client_web_apps_bmo_sync_test.cc b/chrome/browser/sync/test/integration/two_client_web_apps_bmo_sync_test.cc
index e59b662..f23f003 100644
--- a/chrome/browser/sync/test/integration/two_client_web_apps_bmo_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_web_apps_bmo_sync_test.cc
@@ -77,7 +77,7 @@
AppId InstallDummyAppAndWaitForSync(const GURL& url,
Profile* profile1,
Profile* profile2) {
- WebApplicationInfo info = WebApplicationInfo();
+ WebAppInstallInfo info = WebAppInstallInfo();
info.title = base::UTF8ToUTF16(url.spec());
info.start_url = url;
AppId dummy_app_id = InstallApp(info, profile1);
@@ -123,12 +123,12 @@
return app_id;
}

- AppId InstallApp(const WebApplicationInfo& info, Profile* profile) {
+ AppId InstallApp(const WebAppInstallInfo& info, Profile* profile) {
return InstallApp(info, profile,
webapps::WebappInstallSource::OMNIBOX_INSTALL_ICON);
}

- AppId InstallApp(const WebApplicationInfo& info,
+ AppId InstallApp(const WebAppInstallInfo& info,
Profile* profile,
webapps::WebappInstallSource source) {
DCHECK(info.start_url.is_valid());
@@ -139,7 +139,7 @@
WebAppProvider::GetForTest(profile)
->install_manager()
.InstallWebAppFromInfo(
- std::make_unique<WebApplicationInfo>(info),
+ std::make_unique<WebAppInstallInfo>(info),
/*overwrite_existing_manifest_fields=*/true,
ForInstallableSite::kYes, source,
base::BindLambdaForTesting(
@@ -215,7 +215,7 @@
IN_PROC_BROWSER_TEST_F(TwoClientWebAppsBMOSyncTest,
SyncDoubleInstallationDifferentNames) {
ASSERT_TRUE(SetupClients());
- WebApplicationInfo info;
+ WebAppInstallInfo info;
info.title = u"Test name";
info.start_url = GURL("http://www.chromium.org/path");

@@ -256,7 +256,7 @@
ASSERT_TRUE(SetupClients());
ASSERT_TRUE(AllProfilesHaveSameWebAppIds());

- WebApplicationInfo info;
+ WebAppInstallInfo info;
info.title = u"Test name";
info.start_url = GURL("http://www.chromium.org/path");
info.user_display_mode = DisplayMode::kStandalone;
diff --git a/chrome/browser/sync/test/integration/two_client_web_apps_sync_test.cc b/chrome/browser/sync/test/integration/two_client_web_apps_sync_test.cc
index 20fff26..6b9f12d 100644
--- a/chrome/browser/sync/test/integration/two_client_web_apps_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_web_apps_sync_test.cc
@@ -92,7 +92,7 @@
WebAppTestInstallObserver install_observer(GetProfile(1));
install_observer.BeginListening();

- WebApplicationInfo info;
+ WebAppInstallInfo info;
info.title = u"Test name";
info.description = u"Test description";
info.start_url = GURL("http://www.chromium.org/path");
@@ -112,7 +112,7 @@
WebAppTestInstallObserver install_observer(GetProfile(1));
install_observer.BeginListening();

- WebApplicationInfo info;
+ WebAppInstallInfo info;
info.title = u"Test name";
info.start_url = GURL("http://www.chromium.org/");
AppId app_id = apps_helper::InstallWebApp(GetProfile(0), info);
@@ -129,7 +129,7 @@
WebAppTestInstallObserver install_observer(GetProfile(1));
install_observer.BeginListening();

- WebApplicationInfo info;
+ WebAppInstallInfo info;
info.title = u"Test name";
info.start_url = GURL("http://www.chromium.org/");
info.theme_color = SK_ColorBLUE;
@@ -150,7 +150,7 @@
WebAppTestInstallObserver install_observer(GetProfile(1));
install_observer.BeginListening();

- WebApplicationInfo info;
+ WebAppInstallInfo info;
info.title = u"Test name";
info.start_url = GURL("http://www.chromium.org/");
AppId app_id = apps_helper::InstallWebApp(GetProfile(0), info);
@@ -168,7 +168,7 @@
const WebAppRegistrar& registrar0 = GetRegistrar(GetProfile(0));
const WebAppRegistrar& registrar1 = GetRegistrar(GetProfile(1));

- WebApplicationInfo info_a;
+ WebAppInstallInfo info_a;
info_a.title = u"Test name A";
info_a.description = u"Description A";
info_a.start_url = GURL("http://www.chromium.org/path/to/start_url");
@@ -188,7 +188,7 @@

// Reinstall same app in Profile 0 with a different metadata aside from the
// name and start_url.
- WebApplicationInfo info_b;
+ WebAppInstallInfo info_b;
info_b.title = u"Test name B";
info_b.description = u"Description B";
info_b.start_url = GURL("http://www.chromium.org/path/to/start_url");
@@ -205,7 +205,7 @@

// Install a separate app just to have something to await on to ensure the
// sync has propagated to the other profile.
- WebApplicationInfo infoC;
+ WebAppInstallInfo infoC;
infoC.title = u"Different test name";
infoC.start_url = GURL("http://www.notchromium.org/");
AppId app_id_c = apps_helper::InstallWebApp(GetProfile(0), infoC);
@@ -277,7 +277,7 @@
dest_install_observer.BeginListening();

// Install app with name.
- WebApplicationInfo info;
+ WebAppInstallInfo info;
info.title = u"Test app";
info.start_url =
embedded_test_server()->GetURL("/web_apps/different_start_url.html");
@@ -307,7 +307,7 @@
dest_install_observer.BeginListening();

// Install app with name.
- WebApplicationInfo info;
+ WebAppInstallInfo info;
info.title = u"Correct App Name";
info.start_url =
embedded_test_server()->GetURL("/web_apps/bad_title_only.html");
@@ -334,7 +334,7 @@
dest_install_observer.BeginListening();

// Install app with name.
- WebApplicationInfo info;
+ WebAppInstallInfo info;
info.title = u"Incorrect App Name";
info.start_url = embedded_test_server()->GetURL("/web_apps/basic.html");
AppId app_id = apps_helper::InstallWebApp(GetProfile(0), info);
@@ -358,7 +358,7 @@
dest_install_observer.BeginListening();

// Install app with name.
- WebApplicationInfo info;
+ WebAppInstallInfo info;
info.title = u"Blue icon";
info.start_url = GURL("https://does-not-exist.org");
info.theme_color = SK_ColorBLUE;
@@ -400,7 +400,7 @@
WebAppTestInstallObserver install_observer(GetProfile(1));
install_observer.BeginListening();

- WebApplicationInfo info;
+ WebAppInstallInfo info;
info.title = u"Test name";
info.description = u"Test description";
info.start_url = GURL("http://www.chromium.org/path");
diff --git a/chrome/browser/ui/app_list/app_service/app_service_app_model_builder_unittest.cc b/chrome/browser/ui/app_list/app_service/app_service_app_model_builder_unittest.cc
index 2660806..33db989d 100644
--- a/chrome/browser/ui/app_list/app_service/app_service_app_model_builder_unittest.cc
+++ b/chrome/browser/ui/app_list/app_service/app_service_app_model_builder_unittest.cc
@@ -337,7 +337,7 @@
std::string CreateWebApp(const std::string& app_name) {
const GURL kAppUrl("https://example.com/");

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->title = base::UTF8ToUTF16(app_name);
web_app_info->start_url = kAppUrl;
web_app_info->scope = kAppUrl;
diff --git a/chrome/browser/ui/ash/chrome_new_window_client_browsertest.cc b/chrome/browser/ui/ash/chrome_new_window_client_browsertest.cc
index 0d24342..8d164af 100644
--- a/chrome/browser/ui/ash/chrome_new_window_client_browsertest.cc
+++ b/chrome/browser/ui/ash/chrome_new_window_client_browsertest.cc
@@ -252,7 +252,7 @@
const GURL app_url = https_server().GetURL(GetAppUrlHost(), GetAppUrlPath());

// InstallTestWebApp() but with a ShareTarget definition added.
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = app_url;
web_app_info->scope =
https_server().GetURL(GetAppUrlHost(), GetAppScopePath());
diff --git a/chrome/browser/ui/ash/desks_templates/desks_templates_client_browsertest.cc b/chrome/browser/ui/ash/desks_templates/desks_templates_client_browsertest.cc
index bbd335a..d327344 100644
--- a/chrome/browser/ui/ash/desks_templates/desks_templates_client_browsertest.cc
+++ b/chrome/browser/ui/ash/desks_templates/desks_templates_client_browsertest.cc
@@ -279,7 +279,7 @@
}

Browser* InstallAndLaunchPWA(const GURL& start_url, bool launch_in_browser) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
if (!launch_in_browser)
diff --git a/chrome/browser/ui/ash/shelf/app_service/app_service_app_window_browsertest.cc b/chrome/browser/ui/ash/shelf/app_service/app_service_app_window_browsertest.cc
index 632f47e..6d3e437d 100644
--- a/chrome/browser/ui/ash/shelf/app_service/app_service_app_window_browsertest.cc
+++ b/chrome/browser/ui/ash/shelf/app_service/app_service_app_window_browsertest.cc
@@ -523,7 +523,7 @@
// |SetUpWebApp()| must be called after |SetUpOnMainThread()| to make sure
// the Network Service process has been setup properly.
std::string CreateWebApp() const {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GetAppURL();
web_app_info->scope = GetAppURL().GetWithoutFilename();

diff --git a/chrome/browser/ui/ash/shelf/app_service/app_service_shelf_context_menu_browsertest.cc b/chrome/browser/ui/ash/shelf/app_service/app_service_shelf_context_menu_browsertest.cc
index 6e5eb072..1f5e6bae 100644
--- a/chrome/browser/ui/ash/shelf/app_service/app_service_shelf_context_menu_browsertest.cc
+++ b/chrome/browser/ui/ash/shelf/app_service/app_service_shelf_context_menu_browsertest.cc
@@ -80,7 +80,7 @@
Profile* profile = browser()->profile();
base::UserActionTester user_action_tester;

- auto web_application_info = std::make_unique<WebApplicationInfo>();
+ auto web_application_info = std::make_unique<WebAppInstallInfo>();
web_application_info->start_url = GURL("https://example.org");
web_application_info->display_mode = blink::mojom::DisplayMode::kMinimalUi;
web_app::AppId app_id =
@@ -113,7 +113,7 @@
Profile* profile = browser()->profile();
base::UserActionTester user_action_tester;

- auto web_application_info = std::make_unique<WebApplicationInfo>();
+ auto web_application_info = std::make_unique<WebAppInstallInfo>();
web_application_info->start_url = GURL("https://example.org");
web_application_info->display_mode = blink::mojom::DisplayMode::kMinimalUi;
web_app::AppId app_id =
@@ -145,7 +145,7 @@
Profile* profile = browser()->profile();
base::UserActionTester user_action_tester;

- auto web_application_info = std::make_unique<WebApplicationInfo>();
+ auto web_application_info = std::make_unique<WebAppInstallInfo>();
web_application_info->start_url = GURL("https://example.org");
web_app::AppId app_id =
web_app::test::InstallWebApp(profile, std::move(web_application_info));
diff --git a/chrome/browser/ui/ash/shelf/chrome_shelf_controller_browsertest.cc b/chrome/browser/ui/ash/shelf/chrome_shelf_controller_browsertest.cc
index 947b9e6..4d3e03e 100644
--- a/chrome/browser/ui/ash/shelf/chrome_shelf_controller_browsertest.cc
+++ b/chrome/browser/ui/ash/shelf/chrome_shelf_controller_browsertest.cc
@@ -466,7 +466,7 @@
}

web_app::AppId InstallWebApp(const GURL& start_url) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
return web_app::test::InstallWebApp(browser()->profile(),
@@ -2617,7 +2617,7 @@
IN_PROC_BROWSER_TEST_F(ShelfWebAppBrowserTest, WebAppPolicyUpdate) {
// Install web app.
GURL app_url = GURL("https://example.org/");
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = app_url;
web_app_info->scope = app_url;
web_app_info->title = u"Example";
diff --git a/chrome/browser/ui/ash/shelf/chrome_shelf_controller_unittest.cc b/chrome/browser/ui/ash/shelf/chrome_shelf_controller_unittest.cc
index 8f01eafb..b9dd7073 100644
--- a/chrome/browser/ui/ash/shelf/chrome_shelf_controller_unittest.cc
+++ b/chrome/browser/ui/ash/shelf/chrome_shelf_controller_unittest.cc
@@ -1069,7 +1069,7 @@
}

void AddWebApp(const char* web_app_id) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
if (web_app_id == web_app::kGmailAppId) {
web_app_info->start_url =
GURL("https://mail.google.com/mail/?usp=installed_webapp");
@@ -3073,7 +3073,7 @@
// * the primary user has a test app pinned to shelf, and
// * secondary user has a tab with the URL associated with the app open (but
// does not have the app installed).
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GURL(kWebAppUrl);
web_app::AppId installed_app_id =
web_app::test::InstallWebApp(profile(), std::move(web_app_info));
@@ -4875,7 +4875,7 @@
}

web_app::AppId InstallExternalWebApp(std::string start_url) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GURL(start_url);
web_app::AppId web_app_id =
web_app::test::InstallWebApp(profile(), std::move(web_app_info));
diff --git a/chrome/browser/ui/browser_dialogs.h b/chrome/browser/ui/browser_dialogs.h
index 0202357..22035d08 100644
--- a/chrome/browser/ui/browser_dialogs.h
+++ b/chrome/browser/ui/browser_dialogs.h
@@ -35,7 +35,7 @@
class GURL;
class LoginHandler;
class Profile;
-struct WebApplicationInfo;
+struct WebAppInstallInfo;

#if BUILDFLAG(ENABLE_EXTENSIONS)
class SettingsOverriddenDialogController;
@@ -148,18 +148,18 @@

// Callback used to indicate whether a user has accepted the installation of a
// web app. The boolean parameter is true when the user accepts the dialog. The
-// WebApplicationInfo parameter contains the information about the app,
+// WebAppInstallInfo parameter contains the information about the app,
// possibly modified by the user.
using AppInstallationAcceptanceCallback =
- base::OnceCallback<void(bool, std::unique_ptr<WebApplicationInfo>)>;
+ base::OnceCallback<void(bool, std::unique_ptr<WebAppInstallInfo>)>;

// Shows the Web App install bubble.
//
-// |web_app_info| is the WebApplicationInfo being converted into an app.
+// |web_app_info| is the WebAppInstallInfo being converted into an app.
// |web_app_info.app_url| should contain a start url from a web app manifest
// (for a Desktop PWA), or the current url (when creating a shortcut app).
void ShowWebAppInstallDialog(content::WebContents* web_contents,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
AppInstallationAcceptanceCallback callback);

// When an app changes its icon or name, that is considered an app identity
@@ -245,13 +245,13 @@
// Shows the PWA installation confirmation bubble anchored off the PWA install
// icon in the omnibox.
//
-// |web_app_info| is the WebApplicationInfo to be installed.
+// |web_app_info| is the WebAppInstallInfo to be installed.
// |callback| is called when install bubble closed.
// |iph_state| records whether PWA install iph is shown before Install bubble is
// shown.
void ShowPWAInstallBubble(
content::WebContents* web_contents,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
AppInstallationAcceptanceCallback callback,
PwaInProductHelpState iph_state = PwaInProductHelpState::kNotShown);

diff --git a/chrome/browser/ui/extensions/hosted_app_browsertest.cc b/chrome/browser/ui/extensions/hosted_app_browsertest.cc
index fc9e02a..6deda814d 100644
--- a/chrome/browser/ui/extensions/hosted_app_browsertest.cc
+++ b/chrome/browser/ui/extensions/hosted_app_browsertest.cc
@@ -211,7 +211,7 @@
base::StringPrintf(kAppDotComManifest, start_url.spec().c_str()));
SetupApp(test_app_dir.UnpackedPath());
} else {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
web_app_info->user_display_mode = blink::mojom::DisplayMode::kStandalone;
diff --git a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
index 16c28d9..4f16686 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
@@ -1623,7 +1623,7 @@
web_app::AppId InstallPWAWithName(Profile* profile,
const GURL& start_url,
const std::string& app_name) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
web_app_info->user_display_mode = blink::mojom::DisplayMode::kStandalone;
@@ -1856,7 +1856,7 @@

#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
web_app::AppId InstallPWA(Profile* profile, const GURL& start_url) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
web_app_info->user_display_mode = blink::mojom::DisplayMode::kStandalone;
@@ -2097,7 +2097,7 @@
// Install web app set to open as a tab.
{
base::RunLoop run_loop;
- WebApplicationInfo info;
+ WebAppInstallInfo info;
info.start_url = GURL(kStartUrl);
info.title = kAppName;
info.user_display_mode = blink::mojom::DisplayMode::kStandalone;
@@ -2725,8 +2725,8 @@
web_app::AppId InstallWebAppWithProtocolHandlers(
const std::vector<apps::ProtocolHandlerInfo>& protocol_handlers,
const std::vector<apps::FileHandler>& file_handlers = {}) {
- std::unique_ptr<WebApplicationInfo> info =
- std::make_unique<WebApplicationInfo>();
+ std::unique_ptr<WebAppInstallInfo> info =
+ std::make_unique<WebAppInstallInfo>();
info->start_url = GURL(kStartUrl);
info->title = kAppName;
info->user_display_mode = blink::mojom::DisplayMode::kStandalone;
diff --git a/chrome/browser/ui/views/apps/app_dialog/app_uninstall_dialog_view_browsertest.cc b/chrome/browser/ui/views/apps/app_dialog/app_uninstall_dialog_view_browsertest.cc
index 6ad2448..c5c4752 100644
--- a/chrome/browser/ui/views/apps/app_dialog/app_uninstall_dialog_view_browsertest.cc
+++ b/chrome/browser/ui/views/apps/app_dialog/app_uninstall_dialog_view_browsertest.cc
@@ -169,7 +169,7 @@
}

void CreateApp() {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GetAppURL();
web_app_info->scope = GetAppURL().GetWithoutFilename();

diff --git a/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view_browsertest.cc b/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view_browsertest.cc
index cf12f80..1132e5a 100644
--- a/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view_browsertest.cc
+++ b/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view_browsertest.cc
@@ -194,7 +194,7 @@
->AddExtension(extension.get());

const GURL start_url = GURL("https://test.com/");
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url;
web_app_info->user_display_mode = blink::mojom::DisplayMode::kStandalone;
diff --git a/chrome/browser/ui/views/frame/browser_frame_browsertest.cc b/chrome/browser/ui/views/frame/browser_frame_browsertest.cc
index 99a47c41a..cd75755 100644
--- a/chrome/browser/ui/views/frame/browser_frame_browsertest.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_browsertest.cc
@@ -48,7 +48,7 @@

// Verifies that the web app is loaded with initial bounds.
IN_PROC_BROWSER_TEST_F(BrowserFrameTest, WebAppsHasBoundsOnOpen) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GURL("http://example.org/");
web_app::AppId app_id = web_app::test::InstallWebApp(browser()->profile(),
std::move(web_app_info));
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_browsertest.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_browsertest.cc
index adc5edc..a6465142 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_browsertest.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_browsertest.cc
@@ -68,7 +68,7 @@
manifest.theme_color = *app_theme_color_;
}

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
GURL manifest_url = embedded_test_server()->GetURL("/manifest");
web_app::UpdateWebAppInfoFromManifest(manifest, manifest_url,
web_app_info.get());
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_chromeos_browsertest.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_chromeos_browsertest.cc
index a1dbba6..225351d5 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_chromeos_browsertest.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_chromeos_browsertest.cc
@@ -192,7 +192,7 @@
CHECK(test_server_->Start());
}
const GURL app_url = test_server_->GetURL("app.com", "/ssl/google.html");
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = app_url;
web_app_info->scope = app_url.GetWithoutFilename();
web_app_info->theme_color = SK_ColorBLUE;
@@ -596,7 +596,7 @@
// |SetUpWebApp()| must be called after |SetUpOnMainThread()| to make sure
// the Network Service process has been setup properly.
void SetUpWebApp() {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GetAppURL();
web_app_info->scope = GetAppURL().GetWithoutFilename();
web_app_info->display_mode = blink::mojom::DisplayMode::kStandalone;
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view_browsertest_win.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view_browsertest_win.cc
index 060c697..5c6dba32 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view_browsertest_win.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view_browsertest_win.cc
@@ -57,7 +57,7 @@
// TODO(https://crbug.com/863278): Force Aero glass on Windows 7 for this
// test.
bool InstallAndLaunchWebApp() {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GetStartURL();
web_app_info->scope = GetStartURL().GetWithoutFilename();
if (theme_color_)
@@ -196,7 +196,7 @@

std::vector<blink::mojom::DisplayMode> display_overrides = {
blink::mojom::DisplayMode::kWindowControlsOverlay};
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
web_app_info->display_mode = blink::mojom::DisplayMode::kStandalone;
diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller_chromeos_browsertest.cc b/chrome/browser/ui/views/frame/immersive_mode_controller_chromeos_browsertest.cc
index 9be8bfa..2e899f0 100644
--- a/chrome/browser/ui/views/frame/immersive_mode_controller_chromeos_browsertest.cc
+++ b/chrome/browser/ui/views/frame/immersive_mode_controller_chromeos_browsertest.cc
@@ -56,7 +56,7 @@
ASSERT_TRUE(https_server_.Start());

const GURL app_url = GetAppUrl();
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = app_url;
web_app_info->scope = app_url.GetWithoutFilename();
web_app_info->theme_color = SK_ColorBLUE;
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view_browsertest.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view_browsertest.cc
index 5cfaff6..c132b0e 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view_browsertest.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view_browsertest.cc
@@ -54,7 +54,7 @@

bool InstallAndLaunchWebApp(
absl::optional<SkColor> theme_color = absl::nullopt) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GetAppURL();
web_app_info->scope = GetAppURL().GetWithoutFilename();
web_app_info->theme_color = theme_color;
@@ -309,7 +309,7 @@
.LoadWindowControlsOverlayTestPageWithDataAndGetURL(
embedded_test_server(), &temp_dir_);

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
web_app_info->display_mode = blink::mojom::DisplayMode::kStandalone;
diff --git a/chrome/browser/ui/views/intent_picker_bubble_view_browsertest_chromeos.cc b/chrome/browser/ui/views/intent_picker_bubble_view_browsertest_chromeos.cc
index 3e41c417..b033050 100644
--- a/chrome/browser/ui/views/intent_picker_bubble_view_browsertest_chromeos.cc
+++ b/chrome/browser/ui/views/intent_picker_bubble_view_browsertest_chromeos.cc
@@ -182,7 +182,7 @@
}

std::string InstallWebApp(const std::string& app_name, const GURL& url) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->title = base::UTF8ToUTF16(app_name);
web_app_info->start_url = url;
web_app_info->scope = url;
diff --git a/chrome/browser/ui/views/location_bar/custom_tab_bar_view_browsertest.cc b/chrome/browser/ui/views/location_bar/custom_tab_bar_view_browsertest.cc
index f77abb4..d343775 100644
--- a/chrome/browser/ui/views/location_bar/custom_tab_bar_view_browsertest.cc
+++ b/chrome/browser/ui/views/location_bar/custom_tab_bar_view_browsertest.cc
@@ -208,7 +208,7 @@
}

void InstallPWA(const GURL& start_url) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
web_app_info->user_display_mode = blink::mojom::DisplayMode::kStandalone;
@@ -216,7 +216,7 @@
}

void InstallBookmark(const GURL& start_url) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.DeprecatedGetOriginAsURL();
web_app_info->user_display_mode = blink::mojom::DisplayMode::kStandalone;
@@ -230,7 +230,7 @@
raw_ptr<web_app::AppBrowserController> app_controller_ = nullptr;

private:
- void Install(std::unique_ptr<WebApplicationInfo> web_app_info) {
+ void Install(std::unique_ptr<WebAppInstallInfo> web_app_info) {
const GURL start_url = web_app_info->start_url;
web_app::AppId app_id = InstallWebApp(std::move(web_app_info));

diff --git a/chrome/browser/ui/views/web_apps/file_handler_launch_dialog_browsertest.cc b/chrome/browser/ui/views/web_apps/file_handler_launch_dialog_browsertest.cc
index 25856b5c..7670c03 100644
--- a/chrome/browser/ui/views/web_apps/file_handler_launch_dialog_browsertest.cc
+++ b/chrome/browser/ui/views/web_apps/file_handler_launch_dialog_browsertest.cc
@@ -69,7 +69,7 @@

void InstallTestWebApp() {
const GURL example_url = GURL(kStartUrl);
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->title = u"Test app";
web_app_info->start_url = example_url;
web_app_info->scope = example_url;
diff --git a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_browsertest.cc b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_browsertest.cc
index ef08ab9..c560e04 100644
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_browsertest.cc
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_browsertest.cc
@@ -448,7 +448,7 @@
std::vector<blink::mojom::DisplayMode> display_overrides;
display_overrides.emplace_back(
web_app::DisplayMode::kWindowControlsOverlay);
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
web_app_info->title = u"A window-controls-overlay app";
diff --git a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_test_helper.cc b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_test_helper.cc
index f510ec97..23d4602 100644
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_test_helper.cc
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_test_helper.cc
@@ -34,7 +34,7 @@
web_app::AppId WebAppFrameToolbarTestHelper::InstallAndLaunchWebApp(
Browser* browser,
const GURL& start_url) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
web_app_info->title = u"A minimal-ui app";
@@ -61,7 +61,7 @@

web_app::AppId WebAppFrameToolbarTestHelper::InstallAndLaunchCustomWebApp(
Browser* browser,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
const GURL& start_url) {
web_app::AppId app_id =
web_app::test::InstallWebApp(browser->profile(), std::move(web_app_info));
diff --git a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_test_helper.h b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_test_helper.h
index 0d1333e..d276889 100644
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_test_helper.h
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_test_helper.h
@@ -11,7 +11,7 @@
#include "chrome/browser/web_applications/web_app_id.h"
#include "content/public/browser/web_contents.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;
class Browser;
class BrowserNonClientFrameView;
class BrowserView;
@@ -42,7 +42,7 @@
const GURL& start_url);
web_app::AppId InstallAndLaunchCustomWebApp(
Browser* browser,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
const GURL& start_url);

GURL LoadWindowControlsOverlayTestPageWithDataAndGetURL(
diff --git a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_test_mixin.cc b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_test_mixin.cc
index e29879c..8dd7d2d 100644
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_test_mixin.cc
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_test_mixin.cc
@@ -25,7 +25,7 @@
void WebAppFrameToolbarTestMixin::InstallAndLaunchWebApp(
Browser* browser,
const GURL& start_url) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
web_app_info->title = u"A minimal-ui app";
diff --git a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_minimal_ui_test.cc b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_minimal_ui_test.cc
index 3247d08..a644292 100644
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_minimal_ui_test.cc
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_minimal_ui_test.cc
@@ -20,7 +20,7 @@
WebAppMinimalUITest& operator=(const WebAppMinimalUITest&) = delete;

BrowserView* CreateBrowserView(blink::mojom::DisplayMode display_mode) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GURL("https://example.org");
web_app_info->display_mode = display_mode;
web_app_info->user_display_mode = blink::mojom::DisplayMode::kStandalone;
diff --git a/chrome/browser/ui/views/web_apps/pwa_confirmation_bubble_view.cc b/chrome/browser/ui/views/web_apps/pwa_confirmation_bubble_view.cc
index e374507..1fd45db 100644
--- a/chrome/browser/ui/views/web_apps/pwa_confirmation_bubble_view.cc
+++ b/chrome/browser/ui/views/web_apps/pwa_confirmation_bubble_view.cc
@@ -48,7 +48,7 @@

// Returns an ImageView containing the app icon.
std::unique_ptr<views::ImageView> CreateIconView(
- const WebApplicationInfo& web_app_info) {
+ const WebAppInstallInfo& web_app_info) {
constexpr int kIconSize = 48;
gfx::ImageSkia image(std::make_unique<WebAppInfoImageSource>(
kIconSize, web_app_info.icon_bitmaps.any),
@@ -101,7 +101,7 @@
PWAConfirmationBubbleView::PWAConfirmationBubbleView(
views::View* anchor_view,
views::Button* highlight_button,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
chrome::AppInstallationAcceptanceCallback callback,
chrome::PwaInProductHelpState iph_state,
PrefService* prefs,
@@ -223,7 +223,7 @@
namespace chrome {

void ShowPWAInstallBubble(content::WebContents* web_contents,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
AppInstallationAcceptanceCallback callback,
PwaInProductHelpState iph_state) {
if (g_bubble_)
diff --git a/chrome/browser/ui/views/web_apps/pwa_confirmation_bubble_view.h b/chrome/browser/ui/views/web_apps/pwa_confirmation_bubble_view.h
index b318c4a..8d9b32a 100644
--- a/chrome/browser/ui/views/web_apps/pwa_confirmation_bubble_view.h
+++ b/chrome/browser/ui/views/web_apps/pwa_confirmation_bubble_view.h
@@ -31,7 +31,7 @@

PWAConfirmationBubbleView(views::View* anchor_view,
views::Button* highlight_button,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
chrome::AppInstallationAcceptanceCallback callback,
chrome::PwaInProductHelpState iph_state,
PrefService* prefs,
@@ -50,7 +50,7 @@
bool Accept() override;

private:
- std::unique_ptr<WebApplicationInfo> web_app_info_;
+ std::unique_ptr<WebAppInstallInfo> web_app_info_;
chrome::AppInstallationAcceptanceCallback callback_;

// Checkbox to launch window with tab strip.
diff --git a/chrome/browser/ui/views/web_apps/pwa_confirmation_bubble_view_browsertest.cc b/chrome/browser/ui/views/web_apps/pwa_confirmation_bubble_view_browsertest.cc
index 3103f0b..0dd107a 100644
--- a/chrome/browser/ui/views/web_apps/pwa_confirmation_bubble_view_browsertest.cc
+++ b/chrome/browser/ui/views/web_apps/pwa_confirmation_bubble_view_browsertest.cc
@@ -32,8 +32,8 @@
}
~PWAConfirmationBubbleViewBrowserTest() override = default;

- std::unique_ptr<WebApplicationInfo> GetAppInfo() {
- auto app_info = std::make_unique<WebApplicationInfo>();
+ std::unique_ptr<WebAppInstallInfo> GetAppInfo() {
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->title = u"Test app 2";
app_info->start_url = GURL("https://example2.com");
app_info->user_display_mode = blink::mojom::DisplayMode::kStandalone;
@@ -46,7 +46,7 @@

IN_PROC_BROWSER_TEST_F(PWAConfirmationBubbleViewBrowserTest,
ShowBubbleInPWAWindow) {
- auto app_info = std::make_unique<WebApplicationInfo>();
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->title = u"Test app";
app_info->start_url = GURL("https://example.com");
Profile* profile = browser()->profile();
@@ -62,7 +62,7 @@

// Tests that we don't crash when attempting to show bubble when it's already
// shown.
- app_info = std::make_unique<WebApplicationInfo>();
+ app_info = std::make_unique<WebAppInstallInfo>();
app_info->title = u"Test app 3";
app_info->start_url = GURL("https://example3.com");
app_info->user_display_mode = blink::mojom::DisplayMode::kStandalone;
@@ -80,7 +80,7 @@
browser()->tab_strip_model()->GetActiveWebContents(), std::move(app_info),
base::BindLambdaForTesting(
[&](bool accepted,
- std::unique_ptr<WebApplicationInfo> app_info_callback) {
+ std::unique_ptr<WebAppInstallInfo> app_info_callback) {
loop.Quit();
}));

@@ -106,7 +106,7 @@
browser()->tab_strip_model()->GetActiveWebContents(), std::move(app_info),
base::BindLambdaForTesting(
[&](bool accepted,
- std::unique_ptr<WebApplicationInfo> app_info_callback) {
+ std::unique_ptr<WebAppInstallInfo> app_info_callback) {
loop.Quit();
}),
chrome::PwaInProductHelpState::kShown);
@@ -164,7 +164,7 @@
browser()->tab_strip_model()->GetActiveWebContents(), std::move(app_info),
base::BindLambdaForTesting(
[&](bool accepted,
- std::unique_ptr<WebApplicationInfo> app_info_callback) {
+ std::unique_ptr<WebAppInstallInfo> app_info_callback) {
loop.Quit();
}),
chrome::PwaInProductHelpState::kShown);
diff --git a/chrome/browser/ui/views/web_apps/web_app_ash_interactive_ui_test.cc b/chrome/browser/ui/views/web_apps/web_app_ash_interactive_ui_test.cc
index 45770c3..dd66d3a 100644
--- a/chrome/browser/ui/views/web_apps/web_app_ash_interactive_ui_test.cc
+++ b/chrome/browser/ui/views/web_apps/web_app_ash_interactive_ui_test.cc
@@ -29,7 +29,7 @@

// InProcessBrowserTest override:
void SetUpOnMainThread() override {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GURL("https://test.org");
web_app::AppId app_id = InstallWebApp(std::move(web_app_info));

diff --git a/chrome/browser/ui/views/web_apps/web_app_confirmation_view.cc b/chrome/browser/ui/views/web_apps/web_app_confirmation_view.cc
index 046766a..5acc8dd 100644
--- a/chrome/browser/ui/views/web_apps/web_app_confirmation_view.cc
+++ b/chrome/browser/ui/views/web_apps/web_app_confirmation_view.cc
@@ -76,7 +76,7 @@
WebAppConfirmationView::~WebAppConfirmationView() {}

WebAppConfirmationView::WebAppConfirmationView(
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
chrome::AppInstallationAcceptanceCallback callback)
: web_app_info_(std::move(web_app_info)), callback_(std::move(callback)) {
DCHECK(web_app_info_);
@@ -241,7 +241,7 @@
namespace chrome {

void ShowWebAppInstallDialog(content::WebContents* web_contents,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
AppInstallationAcceptanceCallback callback) {
auto* dialog =
new WebAppConfirmationView(std::move(web_app_info), std::move(callback));
diff --git a/chrome/browser/ui/views/web_apps/web_app_confirmation_view.h b/chrome/browser/ui/views/web_apps/web_app_confirmation_view.h
index 3fb2675..443b13f 100644
--- a/chrome/browser/ui/views/web_apps/web_app_confirmation_view.h
+++ b/chrome/browser/ui/views/web_apps/web_app_confirmation_view.h
@@ -26,7 +26,7 @@
public views::TextfieldController {
public:
METADATA_HEADER(WebAppConfirmationView);
- WebAppConfirmationView(std::unique_ptr<WebApplicationInfo> web_app_info,
+ WebAppConfirmationView(std::unique_ptr<WebAppInstallInfo> web_app_info,
chrome::AppInstallationAcceptanceCallback callback);
WebAppConfirmationView(const WebAppConfirmationView&) = delete;
WebAppConfirmationView& operator=(const WebAppConfirmationView&) = delete;
@@ -49,9 +49,9 @@
// Get the trimmed contents of the title text field.
std::u16string GetTrimmedTitle() const;

- // The WebApplicationInfo that the user is editing.
+ // The WebAppInstallInfo that the user is editing.
// Cleared when the dialog completes (Accept/WindowClosing).
- std::unique_ptr<WebApplicationInfo> web_app_info_;
+ std::unique_ptr<WebAppInstallInfo> web_app_info_;

// The callback to be invoked when the dialog is completed.
chrome::AppInstallationAcceptanceCallback callback_;
diff --git a/chrome/browser/ui/views/web_apps/web_app_confirmation_view_browsertest.cc b/chrome/browser/ui/views/web_apps/web_app_confirmation_view_browsertest.cc
index b748458..281e317 100644
--- a/chrome/browser/ui/views/web_apps/web_app_confirmation_view_browsertest.cc
+++ b/chrome/browser/ui/views/web_apps/web_app_confirmation_view_browsertest.cc
@@ -25,11 +25,11 @@

// DialogBrowserTest:
void ShowUi(const std::string& name) override {
- auto app_info = std::make_unique<WebApplicationInfo>();
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->title = u"Test app";
app_info->start_url = GURL("https://example.com");

- auto callback = [](bool result, std::unique_ptr<WebApplicationInfo>) {};
+ auto callback = [](bool result, std::unique_ptr<WebAppInstallInfo>) {};

chrome::ShowWebAppInstallDialog(
browser()->tab_strip_model()->GetActiveWebContents(),
@@ -54,7 +54,7 @@
};

IN_PROC_BROWSER_TEST_P(WebAppConfirmViewBrowserTest, ShowWebAppInstallDialog) {
- auto app_info = std::make_unique<WebApplicationInfo>();
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->title = u"Test app";
app_info->start_url = GURL("https://example.com");

@@ -62,7 +62,7 @@
/*auto_open_in_window=*/true);
bool is_accepted = false;
auto callback = [&is_accepted](bool result,
- std::unique_ptr<WebApplicationInfo>) {
+ std::unique_ptr<WebAppInstallInfo>) {
is_accepted = result;
};

@@ -90,14 +90,14 @@
};

for (const TestCases& test_case : test_cases) {
- auto app_info = std::make_unique<WebApplicationInfo>();
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->title = test_case.input;
app_info->start_url = GURL("https://example.com");

bool is_accepted = false;
std::u16string title;
auto callback = [&is_accepted, &title](
- bool result, std::unique_ptr<WebApplicationInfo> info) {
+ bool result, std::unique_ptr<WebAppInstallInfo> info) {
is_accepted = result;
title = info->title;
};
diff --git a/chrome/browser/ui/views/web_apps/web_app_info_image_source.h b/chrome/browser/ui/views/web_apps/web_app_info_image_source.h
index 736f8a3..195a926 100644
--- a/chrome/browser/ui/views/web_apps/web_app_info_image_source.h
+++ b/chrome/browser/ui/views/web_apps/web_app_info_image_source.h
@@ -11,7 +11,7 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/image/image_skia_source.h"

-// An image source which draws from a WebApplicationInfo icons list.
+// An image source which draws from a WebAppInstallInfo icons list.
class WebAppInfoImageSource : public gfx::ImageSkiaSource {
public:
WebAppInfoImageSource(int dip_size,
diff --git a/chrome/browser/ui/views/web_apps/web_app_protocol_handler_intent_picker_dialog_browsertest.cc b/chrome/browser/ui/views/web_apps/web_app_protocol_handler_intent_picker_dialog_browsertest.cc
index 036d78f..61625e4 100644
--- a/chrome/browser/ui/views/web_apps/web_app_protocol_handler_intent_picker_dialog_browsertest.cc
+++ b/chrome/browser/ui/views/web_apps/web_app_protocol_handler_intent_picker_dialog_browsertest.cc
@@ -28,7 +28,7 @@

AppId InstallTestWebApp(Profile* profile) {
const GURL example_url = GURL("http://example.org/");
- auto app_info = std::make_unique<WebApplicationInfo>();
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->title = u"Test app";
app_info->start_url = example_url;
app_info->scope = example_url;
diff --git a/chrome/browser/ui/views/web_apps/web_app_tab_strip_browsertest.cc b/chrome/browser/ui/views/web_apps/web_app_tab_strip_browsertest.cc
index 90afc8d..df7db80 100644
--- a/chrome/browser/ui/views/web_apps/web_app_tab_strip_browsertest.cc
+++ b/chrome/browser/ui/views/web_apps/web_app_tab_strip_browsertest.cc
@@ -66,7 +66,7 @@
Profile* profile = browser()->profile();
GURL start_url = embedded_test_server()->GetURL(kAppPath);

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
web_app_info->title = u"Test app";
@@ -151,7 +151,7 @@
/*dialog_callback=*/
base::BindLambdaForTesting(
[](content::WebContents*,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
ForInstallableSite,
WebAppInstallationAcceptanceCallback acceptance_callback) {
web_app_info->user_display_mode = DisplayMode::kTabbed;
diff --git a/chrome/browser/ui/views/web_apps/web_app_uninstall_dialog_browsertest.cc b/chrome/browser/ui/views/web_apps/web_app_uninstall_dialog_browsertest.cc
index 019951c..a9a94a2 100644
--- a/chrome/browser/ui/views/web_apps/web_app_uninstall_dialog_browsertest.cc
+++ b/chrome/browser/ui/views/web_apps/web_app_uninstall_dialog_browsertest.cc
@@ -37,7 +37,7 @@
AppId InstallTestWebApp(Profile* profile) {
const GURL example_url = GURL("http://example.org/");

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = example_url;
web_app_info->scope = example_url;
web_app_info->user_display_mode = blink::mojom::DisplayMode::kStandalone;
diff --git a/chrome/browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_browsertest.cc b/chrome/browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_browsertest.cc
index 99f05b2..de08bfc5 100644
--- a/chrome/browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_browsertest.cc
+++ b/chrome/browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_browsertest.cc
@@ -59,7 +59,7 @@
}

web_app::AppId InstallTestWebApp(Profile* profile) {
- auto app_info = std::make_unique<WebApplicationInfo>();
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->start_url = GURL(kStartUrl);
app_info->title = kAppName;
app_info->user_display_mode = blink::mojom::DisplayMode::kStandalone;
diff --git a/chrome/browser/ui/web_applications/system_web_app_ui_utils.h b/chrome/browser/ui/web_applications/system_web_app_ui_utils.h
index 3f302b6..c4b0966 100644
--- a/chrome/browser/ui/web_applications/system_web_app_ui_utils.h
+++ b/chrome/browser/ui/web_applications/system_web_app_ui_utils.h
@@ -42,7 +42,7 @@
~SystemAppLaunchParams();

// If provided launches System Apps into |url|, instead of its start_url (as
- // specified its WebApplicationInfo). Mutually exclusive with non-empty
+ // specified its WebAppInstallInfo). Mutually exclusive with non-empty
// |launch_paths|.
absl::optional<GURL> url;

@@ -52,7 +52,7 @@

// If non-empty, specifies files passed to Web File Handling. Apps need to
// have "FileHandling" origin trial in its SystemAppInfo, and file handlers
- // in its WebApplicationInfo. Mutually exclusive with |url|.
+ // in its WebAppInstallInfo. Mutually exclusive with |url|.
std::vector<base::FilePath> launch_paths;
};

diff --git a/chrome/browser/ui/web_applications/test/web_app_browsertest_util.cc b/chrome/browser/ui/web_applications/test/web_app_browsertest_util.cc
index b8e20f7..546756d 100644
--- a/chrome/browser/ui/web_applications/test/web_app_browsertest_util.cc
+++ b/chrome/browser/ui/web_applications/test/web_app_browsertest_util.cc
@@ -71,7 +71,7 @@

void AutoAcceptDialogCallback(
content::WebContents* initiator_web_contents,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
ForInstallableSite for_installable_site,
WebAppInstallationAcceptanceCallback acceptance_callback) {
web_app_info->user_display_mode = DisplayMode::kStandalone;
diff --git a/chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.cc b/chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.cc
index f013d72..15fb17f 100644
--- a/chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.cc
+++ b/chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.cc
@@ -230,7 +230,7 @@
CHECK(https_server_.Start());
}

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = https_server_.GetURL(app_host, GetAppUrlPath());
web_app_info->scope = https_server_.GetURL(app_host, app_scope);
web_app_info->title = base::UTF8ToUTF16(GetAppName());
diff --git a/chrome/browser/ui/web_applications/web_app_badging_browsertest.cc b/chrome/browser/ui/web_applications/web_app_badging_browsertest.cc
index 7119055..30fe2f2 100644
--- a/chrome/browser/ui/web_applications/web_app_badging_browsertest.cc
+++ b/chrome/browser/ui/web_applications/web_app_badging_browsertest.cc
@@ -48,7 +48,7 @@
main_app_id_ = InstallPWA(start_url);

GURL sub_start_url = https_server()->GetURL("/web_app_badging/blank.html");
- auto sub_app_info = std::make_unique<WebApplicationInfo>();
+ auto sub_app_info = std::make_unique<WebAppInstallInfo>();
sub_app_info->start_url = sub_start_url;
sub_app_info->scope = sub_start_url;
sub_app_info->user_display_mode = DisplayMode::kStandalone;
diff --git a/chrome/browser/ui/web_applications/web_app_browsertest.cc b/chrome/browser/ui/web_applications/web_app_browsertest.cc
index 2d36656..877f940 100644
--- a/chrome/browser/ui/web_applications/web_app_browsertest.cc
+++ b/chrome/browser/ui/web_applications/web_app_browsertest.cc
@@ -185,7 +185,7 @@
base::HistogramTester tester;
const GURL app_url = https_server()->GetURL(
base::StringPrintf("/web_apps/basic.html?index=%d", index++));
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = app_url;
web_app_info->scope = app_url;
web_app_info->display_mode = display_mode;
@@ -264,7 +264,7 @@
manifest.scope = GURL(kExampleURL);
manifest.has_theme_color = true;
manifest.theme_color = theme_color;
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app::UpdateWebAppInfoFromManifest(manifest, GURL(kExampleManifestURL),
web_app_info.get());

@@ -276,7 +276,7 @@
app_browser->app_controller()->GetThemeColor());
}
{
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GURL("http://example.org/2");
web_app_info->scope = GURL("http://example.org/");
web_app_info->theme_color = absl::optional<SkColor>();
@@ -294,7 +294,7 @@
manifest.scope = GURL(kExampleURL);
manifest.has_background_color = true;
manifest.background_color = SkColorSetA(SK_ColorBLUE, 0xF0);
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app::UpdateWebAppInfoFromManifest(manifest, GURL(kExampleManifestURL),
web_app_info.get());
AppId app_id = InstallWebApp(std::move(web_app_info));
@@ -333,7 +333,7 @@
web_app::SystemAppType::HELP);
} else {
const GURL app_url = GetSecureAppURL();
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = app_url;
web_app_info->scope = app_url.GetWithoutFilename();
web_app_info->theme_color = SK_ColorBLUE;
@@ -418,7 +418,7 @@
ThemeServiceFactory::GetForProfile(browser()->profile())
->BuildAutogeneratedThemeFromColor(SK_ColorBLUE);

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GURL(kExampleURL);
AppId app_id = InstallWebApp(std::move(web_app_info));

@@ -1354,7 +1354,7 @@
// app window.
IN_PROC_BROWSER_TEST_F(WebAppBrowserTest, ReparentDisplayBrowserApp) {
const GURL app_url = GetSecureAppURL();
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = app_url;
web_app_info->scope = app_url.GetWithoutFilename();
web_app_info->display_mode = DisplayMode::kBrowser;
@@ -1438,7 +1438,7 @@
https_server()->GetURL("app.com", "/web_apps/title_appname_prefix.html");
const std::u16string app_title = u"A Web App";

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = app_url;
web_app_info->scope = app_url.GetWithoutFilename();
web_app_info->title = app_title;
@@ -1462,7 +1462,7 @@
// empty or simple title.
const GURL app_url = https_server()->GetURL("app.site.test", "/empty.html");
const std::u16string app_title = u"A Web App";
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = app_url;
web_app_info->scope = app_url.GetWithoutFilename();
web_app_info->title = app_title;
@@ -1494,7 +1494,7 @@
const GURL app_url = GetSecureAppURL();
const std::u16string app_title = u"A Web App";

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = app_url;
web_app_info->scope = app_url.GetWithoutFilename();
web_app_info->title = app_title;
@@ -1531,7 +1531,7 @@
embedded_test_server()->GetURL("app.site.test", "/simple.html");
const std::u16string app_title = u"A Web App";

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = app_url;
web_app_info->title = app_title;
const AppId app_id = InstallWebApp(std::move(web_app_info));
diff --git a/chrome/browser/ui/web_applications/web_app_controller_browsertest.cc b/chrome/browser/ui/web_applications/web_app_controller_browsertest.cc
index 88a6337..a7ea720 100644
--- a/chrome/browser/ui/web_applications/web_app_controller_browsertest.cc
+++ b/chrome/browser/ui/web_applications/web_app_controller_browsertest.cc
@@ -61,7 +61,7 @@
}

AppId WebAppControllerBrowserTest::InstallPWA(const GURL& start_url) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
web_app_info->user_display_mode = DisplayMode::kStandalone;
@@ -70,7 +70,7 @@
}

AppId WebAppControllerBrowserTest::InstallWebApp(
- std::unique_ptr<WebApplicationInfo> web_app_info) {
+ std::unique_ptr<WebAppInstallInfo> web_app_info) {
return web_app::test::InstallWebApp(profile(), std::move(web_app_info));
}

diff --git a/chrome/browser/ui/web_applications/web_app_controller_browsertest.h b/chrome/browser/ui/web_applications/web_app_controller_browsertest.h
index 57c0a0b..3ed45766 100644
--- a/chrome/browser/ui/web_applications/web_app_controller_browsertest.h
+++ b/chrome/browser/ui/web_applications/web_app_controller_browsertest.h
@@ -43,7 +43,7 @@

AppId InstallPWA(const GURL& app_url);

- AppId InstallWebApp(std::unique_ptr<WebApplicationInfo> web_app_info);
+ AppId InstallWebApp(std::unique_ptr<WebAppInstallInfo> web_app_info);

// Launches the app as a window and returns the browser.
Browser* LaunchWebAppBrowser(const AppId&);
diff --git a/chrome/browser/ui/web_applications/web_app_dark_mode_browsertest.cc b/chrome/browser/ui/web_applications/web_app_dark_mode_browsertest.cc
index 894021e..e5c0f8b 100644
--- a/chrome/browser/ui/web_applications/web_app_dark_mode_browsertest.cc
+++ b/chrome/browser/ui/web_applications/web_app_dark_mode_browsertest.cc
@@ -34,7 +34,7 @@
~WebAppDarkModeBrowserTest() override = default;

AppId InstallWebAppFromInfo() {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
// We want to hang so WebContents does not update the background color.
web_app_info->start_url = https_server()->GetURL("/hung");
web_app_info->title = u"A Web App";
diff --git a/chrome/browser/ui/web_applications/web_app_dialog_utils.cc b/chrome/browser/ui/web_applications/web_app_dialog_utils.cc
index f5c50af..313b7a5 100644
--- a/chrome/browser/ui/web_applications/web_app_dialog_utils.cc
+++ b/chrome/browser/ui/web_applications/web_app_dialog_utils.cc
@@ -36,7 +36,7 @@
webapps::WebappInstallSource install_source,
chrome::PwaInProductHelpState iph_state,
content::WebContents* initiator_web_contents,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
ForInstallableSite for_installable_site,
WebAppInstallationAcceptanceCallback web_app_acceptance_callback) {
DCHECK(web_app_info);
diff --git a/chrome/browser/ui/web_applications/web_app_engagement_browsertest.cc b/chrome/browser/ui/web_applications/web_app_engagement_browsertest.cc
index f956370..e30c2d7 100644
--- a/chrome/browser/ui/web_applications/web_app_engagement_browsertest.cc
+++ b/chrome/browser/ui/web_applications/web_app_engagement_browsertest.cc
@@ -209,7 +209,7 @@
}

AppId InstallWebAppAndCountApps(
- std::unique_ptr<WebApplicationInfo> web_app_info) {
+ std::unique_ptr<WebAppInstallInfo> web_app_info) {
AppId app_id = InstallWebApp(std::move(web_app_info));
CountUserInstalledApps();
return app_id;
@@ -229,7 +229,7 @@

const GURL example_url = GURL("http://example.org/");

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = example_url;
web_app_info->scope = example_url;
web_app_info->user_display_mode = DisplayMode::kStandalone;
@@ -255,7 +255,7 @@

const GURL example_url = GURL("http://example.org/");

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = example_url;
web_app_info->scope = example_url;
web_app_info->user_display_mode = DisplayMode::kBrowser;
@@ -280,7 +280,7 @@

const GURL example_url = GURL("http://example.org/");

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = example_url;
// If app has no scope then UrlHandlers::GetUrlHandlers are empty. Therefore,
// the app is counted as installed via the Create Shortcut button.
@@ -314,13 +314,13 @@

// Install two apps.
{
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = example_url1;
web_app_info->scope = example_url1;
app_id1 = InstallWebAppAndCountApps(std::move(web_app_info));
}
{
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = example_url2;
web_app_info->scope = example_url2;
app_id2 = InstallWebAppAndCountApps(std::move(web_app_info));
@@ -365,7 +365,7 @@
for (int i = 0; i < num_user_apps; ++i) {
const GURL url = GetUrlForSuffix(base_url, i);

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = url;
web_app_info->scope = url;
AppId app_id = InstallWebAppAndCountApps(std::move(web_app_info));
@@ -425,7 +425,7 @@
const GURL start_url = GURL("http://example.org/app/");
const GURL outer_url = GURL("http://example.org/");

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url;
web_app_info->user_display_mode = DisplayMode::kBrowser;
diff --git a/chrome/browser/ui/web_applications/web_app_file_handling_browsertest.cc b/chrome/browser/ui/web_applications/web_app_file_handling_browsertest.cc
index 6d1cf9f..3032376 100644
--- a/chrome/browser/ui/web_applications/web_app_file_handling_browsertest.cc
+++ b/chrome/browser/ui/web_applications/web_app_file_handling_browsertest.cc
@@ -94,7 +94,7 @@
void InstallFileHandlingPWA() {
GURL url = GetSecureAppURL();

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = url;
web_app_info->scope = url.GetWithoutFilename();
web_app_info->title = u"A Hosted App";
@@ -130,7 +130,7 @@
}

AppId InstallAnotherFileHandlingPwa(const GURL& start_url) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = start_url.GetWithoutFilename();
web_app_info->title = u"A second app";
@@ -345,7 +345,7 @@
IN_PROC_BROWSER_TEST_F(WebAppFileHandlingBrowserTest,
LaunchQueueSetOnRedirect) {
// Install an app where the file handling action page redirects.
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url =
https_server()->GetURL("app.com", "/web_app_file_handling/index.html");
web_app_info->scope = web_app_info->start_url.GetWithoutFilename();
@@ -381,7 +381,7 @@
}

IN_PROC_BROWSER_TEST_F(WebAppFileHandlingBrowserTest, LaunchQueueSetOnReload) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url =
https_server()->GetURL("app.com", "/web_app_file_handling/index.html");
web_app_info->scope = web_app_info->start_url.GetWithoutFilename();
@@ -418,7 +418,7 @@
LaunchQueueNotSetOnCrossOriginRedirect) {
// Install an app where the file handling action page redirects to a page on a
// different origin.
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url =
https_server()->GetURL("app.com", "/web_app_file_handling/index.html");
web_app_info->scope = web_app_info->start_url.GetWithoutFilename();
@@ -457,7 +457,7 @@
LaunchQueueNotSetOnNavigate) {
GURL start_url =
https_server()->GetURL("app.com", "/web_app_file_handling/index.html");
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->scope = web_app_info->start_url.GetWithoutFilename();
web_app_info->title = u"An app that will be navigated";
diff --git a/chrome/browser/ui/web_applications/web_app_metrics_browsertest.cc b/chrome/browser/ui/web_applications/web_app_metrics_browsertest.cc
index 07862d5..abb323f 100644
--- a/chrome/browser/ui/web_applications/web_app_metrics_browsertest.cc
+++ b/chrome/browser/ui/web_applications/web_app_metrics_browsertest.cc
@@ -51,7 +51,7 @@
}

AppId InstallWebApp() {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GetInstallableAppURL();
web_app_info->title = u"A Web App";
web_app_info->display_mode = DisplayMode::kStandalone;
@@ -108,7 +108,7 @@
InstalledWebAppInTab_RecordsDailyInteraction) {
ukm::TestAutoSetUkmRecorder ukm_recorder;

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GetInstallableAppURL();
web_app_info->title = u"A Web App";
web_app_info->display_mode = DisplayMode::kStandalone;
@@ -151,7 +151,7 @@
InstalledWebAppInWindow_RecordsDailyInteractionWithSessionDurations) {
ukm::TestAutoSetUkmRecorder ukm_recorder;

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GetInstallableAppURL();
web_app_info->title = u"A Web App";
web_app_info->display_mode = DisplayMode::kStandalone;
diff --git a/chrome/browser/ui/web_applications/web_app_ui_manager_impl_browsertest.cc b/chrome/browser/ui/web_applications/web_app_ui_manager_impl_browsertest.cc
index c01cea5..47c3d19 100644
--- a/chrome/browser/ui/web_applications/web_app_ui_manager_impl_browsertest.cc
+++ b/chrome/browser/ui/web_applications/web_app_ui_manager_impl_browsertest.cc
@@ -56,7 +56,7 @@
Profile* profile() { return browser()->profile(); }

const AppId InstallWebApp(const GURL& start_url) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = start_url;
web_app_info->user_display_mode = DisplayMode::kStandalone;
return web_app::test::InstallWebApp(profile(), std::move(web_app_info));
diff --git a/chrome/browser/ui/web_applications/web_app_uninstall_browsertest.cc b/chrome/browser/ui/web_applications/web_app_uninstall_browsertest.cc
index b130075a..8b92f43d 100644
--- a/chrome/browser/ui/web_applications/web_app_uninstall_browsertest.cc
+++ b/chrome/browser/ui/web_applications/web_app_uninstall_browsertest.cc
@@ -184,7 +184,7 @@
IN_PROC_BROWSER_TEST_F(WebAppUninstallBrowserTest, PrefsRemovedAfterUninstall) {
const GURL app_url = GetSecureAppURL();
const url::Origin origin = url::Origin::Create(app_url);
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = app_url;
web_app_info->scope = app_url.GetWithoutFilename();
web_app_info->is_storage_isolated = true;
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index 1e2fb6f..386d144 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -1170,7 +1170,7 @@
void AppLauncherHandler::OnFaviconForAppInstallFromLink(
std::unique_ptr<AppInstallInfo> install_info,
const favicon_base::FaviconImageResult& image_result) {
- auto web_app = std::make_unique<WebApplicationInfo>();
+ auto web_app = std::make_unique<WebAppInstallInfo>();
web_app->title = install_info->title;
web_app->start_url = install_info->app_url;

diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler_unittest.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler_unittest.cc
index 7e66364..f02cb50 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler_unittest.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler_unittest.cc
@@ -64,8 +64,8 @@
}
};

-std::unique_ptr<WebApplicationInfo> BuildWebAppInfo() {
- auto app_info = std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> BuildWebAppInfo() {
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->start_url = GURL(kTestAppUrl);
app_info->scope = GURL(kTestAppUrl);
app_info->title = kTestAppTitle;
diff --git a/chrome/browser/web_applications/app_service/link_capturing_migration_manager_browsertest.cc b/chrome/browser/web_applications/app_service/link_capturing_migration_manager_browsertest.cc
index 2355eb0..d0bad75 100644
--- a/chrome/browser/web_applications/app_service/link_capturing_migration_manager_browsertest.cc
+++ b/chrome/browser/web_applications/app_service/link_capturing_migration_manager_browsertest.cc
@@ -36,7 +36,7 @@
Profile* profile = browser()->profile();
auto* proxy = apps::AppServiceProxyFactory::GetForProfile(profile);

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->title = u"Test app";
web_app_info->start_url = GURL("https://example.org");
web_app_info->capture_links =
diff --git a/chrome/browser/web_applications/app_service/web_apps_publisher_host_browsertest.cc b/chrome/browser/web_applications/app_service/web_apps_publisher_host_browsertest.cc
index fe5dafc..ad4bc80a 100644
--- a/chrome/browser/web_applications/app_service/web_apps_publisher_host_browsertest.cc
+++ b/chrome/browser/web_applications/app_service/web_apps_publisher_host_browsertest.cc
@@ -216,7 +216,7 @@
AppId app_id;
{
const std::u16string original_description = u"Original Web App";
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = app_url;
web_app_info->scope = app_url;
web_app_info->title = original_description;
@@ -230,7 +230,7 @@

{
const std::u16string updated_description = u"Updated Web App";
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = app_url;
web_app_info->scope = app_url;
web_app_info->title = updated_description;
@@ -259,7 +259,7 @@
AppId app_id;
{
const std::u16string description = u"Web App";
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = app_url;
web_app_info->scope = app_url;
web_app_info->title = description;
@@ -325,7 +325,7 @@

// Install an additional app from a different host.
{
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GURL("https://example.com:8080/");
web_app_info->scope = web_app_info->start_url;
web_app_info->title = u"Unrelated Web App";
@@ -647,7 +647,7 @@
AppId app2_id;
{
const std::u16string description = u"Uninstalled Web App";
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url =
embedded_test_server()->GetURL("app.site.com", "/simple.html");
web_app_info->scope = web_app_info->start_url.GetWithoutFilename();
diff --git a/chrome/browser/web_applications/docs/manifest_representations.md b/chrome/browser/web_applications/docs/manifest_representations.md
index 2993bcc..db024f61 100644
--- a/chrome/browser/web_applications/docs/manifest_representations.md
+++ b/chrome/browser/web_applications/docs/manifest_representations.md
@@ -10,7 +10,7 @@
- [blink::Manifest](../../../../third_party/blink/public/common/manifest/manifest.h)\
Pre blink.mojom.Manifest representation that is getting cleaned up: https://crbug.com/1233362

- - [WebApplicationInfo](../web_application_info.h)\
+ - [WebAppInstallInfo](../web_application_info.h)\
Used for installation and updates.

- [web_app::WebApp](../web_app.h)\
@@ -26,7 +26,7 @@
Manifest data provided by an HTML document.

- [web_app::ParseOfflineManifest()](../preinstalled_web_app_utils.cc)\
- Custom JSON + PNG format for bundling WebApplicationInfo data on disk for offline default web app installation.
+ Custom JSON + PNG format for bundling WebAppInstallInfo data on disk for offline default web app installation.

- [WebApkInfo](../../android/webapk/webapk_info.h)\
Web app installation data that was packaged in an APK.
diff --git a/chrome/browser/web_applications/extensions/externally_managed_app_install_task_unittest.cc b/chrome/browser/web_applications/extensions/externally_managed_app_install_task_unittest.cc
index 11ed93b..76d4aeff 100644
--- a/chrome/browser/web_applications/extensions/externally_managed_app_install_task_unittest.cc
+++ b/chrome/browser/web_applications/extensions/externally_managed_app_install_task_unittest.cc
@@ -136,7 +136,7 @@
GetAppIdForUrl(app_url), uninstalled};
}

- const std::vector<WebApplicationInfo>& web_app_info_list() {
+ const std::vector<WebAppInstallInfo>& web_app_info_list() {
return web_app_info_list_;
}

@@ -151,7 +151,7 @@
size_t num_reparent_tab_calls() { return num_reparent_tab_calls_; }

// WebAppInstallFinalizer
- void FinalizeInstall(const WebApplicationInfo& web_app_info,
+ void FinalizeInstall(const WebAppInstallInfo& web_app_info,
const FinalizeOptions& options,
InstallFinalizedCallback callback) override {
DCHECK(
@@ -183,7 +183,7 @@
NOTREACHED();
}

- void FinalizeUpdate(const WebApplicationInfo& web_app_info,
+ void FinalizeUpdate(const WebAppInstallInfo& web_app_info,
InstallFinalizedCallback callback) override {
NOTREACHED();
}
@@ -261,7 +261,7 @@
private:
raw_ptr<WebAppRegistrarMutable> registrar_ = nullptr;

- std::vector<WebApplicationInfo> web_app_info_list_;
+ std::vector<WebAppInstallInfo> web_app_info_list_;
std::vector<FinalizeOptions> finalize_options_list_;
std::vector<GURL> uninstall_external_web_app_urls_;

@@ -342,7 +342,7 @@

FakeDataRetriever* data_retriever() { return data_retriever_; }

- const WebApplicationInfo& web_app_info() {
+ const WebAppInstallInfo& web_app_info() {
DCHECK_EQ(1u, install_finalizer_->web_app_info_list().size());
return install_finalizer_->web_app_info_list().at(0);
}
@@ -363,8 +363,8 @@
manifest->start_url = options.install_url;
manifest->name = u"Manifest Name";

- data_retriever_->SetRendererWebApplicationInfo(
- std::make_unique<WebApplicationInfo>());
+ data_retriever_->SetRendererWebAppInstallInfo(
+ std::make_unique<WebAppInstallInfo>());

data_retriever_->SetManifest(std::move(manifest), /*is_installable=*/true);

@@ -455,7 +455,7 @@
auto task = GetInstallationTaskWithTestMocks(
{kWebAppUrl, DisplayMode::kStandalone,
ExternalInstallSource::kInternalDefault});
- data_retriever()->SetRendererWebApplicationInfo(nullptr);
+ data_retriever()->SetRendererWebAppInstallInfo(nullptr);
url_loader().SetPrepareForLoadResultLoaded();
url_loader().SetNextLoadUrlResult(kWebAppUrl,
WebAppUrlLoader::Result::kUrlLoaded);
@@ -469,7 +469,7 @@
ExternallyInstalledWebAppPrefs(profile()->GetPrefs())
.LookupAppId(kWebAppUrl);

- EXPECT_EQ(InstallResultCode::kGetWebApplicationInfoFailed,
+ EXPECT_EQ(InstallResultCode::kGetWebAppInstallInfoFailed,
result.code);
EXPECT_FALSE(result.app_id.has_value());

@@ -710,7 +710,7 @@
EXPECT_EQ(1u, finalizer()->finalize_options_list().size());
EXPECT_EQ(webapps::WebappInstallSource::EXTERNAL_POLICY,
finalize_options().install_source);
- const WebApplicationInfo& web_app_info =
+ const WebAppInstallInfo& web_app_info =
finalizer()->web_app_info_list().at(0);

EXPECT_EQ(base::UTF8ToUTF16(kWebAppUrl.spec()), web_app_info.title);
@@ -749,7 +749,7 @@
EXPECT_EQ(1u, finalizer()->finalize_options_list().size());
EXPECT_EQ(webapps::WebappInstallSource::EXTERNAL_DEFAULT,
finalize_options().install_source);
- const WebApplicationInfo& web_app_info =
+ const WebAppInstallInfo& web_app_info =
finalizer()->web_app_info_list().at(0);

EXPECT_EQ(base::UTF8ToUTF16(kWebAppUrl.spec()), web_app_info.title);
@@ -792,7 +792,7 @@
EXPECT_EQ(1u, finalizer()->finalize_options_list().size());
EXPECT_EQ(webapps::WebappInstallSource::EXTERNAL_POLICY,
finalize_options().install_source);
- const WebApplicationInfo& web_app_info =
+ const WebAppInstallInfo& web_app_info =
finalizer()->web_app_info_list().at(0);

EXPECT_EQ(base::UTF8ToUTF16(kWebAppUrl.spec()), web_app_info.title);
@@ -1090,7 +1090,7 @@
ExternalInstallSource::kSystemInstalled);
options.only_use_app_info_factory = true;
options.app_info_factory = base::BindLambdaForTesting([&kWebAppUrl]() {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = kWebAppUrl;
info->scope = kWebAppUrl.GetWithoutFilename();
info->title = u"Foo Web App";
@@ -1141,7 +1141,7 @@
ExternalInstallSource::kSystemInstalled);
options.only_use_app_info_factory = true;
options.app_info_factory = base::BindLambdaForTesting([&kWebAppUrl]() {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = kWebAppUrl;
info->scope = kWebAppUrl.GetWithoutFilename();
info->title = u"Foo Web App";
diff --git a/chrome/browser/web_applications/external_install_options.h b/chrome/browser/web_applications/external_install_options.h
index 45a21d9ba..5ee60b9e 100644
--- a/chrome/browser/web_applications/external_install_options.h
+++ b/chrome/browser/web_applications/external_install_options.h
@@ -19,8 +19,8 @@

namespace web_app {

-using WebApplicationInfoFactory =
- base::RepeatingCallback<std::unique_ptr<WebApplicationInfo>()>;
+using WebAppInstallInfoFactory =
+ base::RepeatingCallback<std::unique_ptr<WebAppInstallInfo>()>;

enum class ExternalInstallSource;

@@ -176,9 +176,9 @@
// |service_worker_registration_url| will not be loaded.
bool only_use_app_info_factory = false;

- // A factory callback that returns a unique_ptr<WebApplicationInfo> to be used
+ // A factory callback that returns a unique_ptr<WebAppInstallInfo> to be used
// as the app's installation metadata.
- WebApplicationInfoFactory app_info_factory;
+ WebAppInstallInfoFactory app_info_factory;

// The type of SystemWebApp, if this app is a System Web App.
absl::optional<SystemAppType> system_app_type = absl::nullopt;
diff --git a/chrome/browser/web_applications/externally_managed_app_install_task.cc b/chrome/browser/web_applications/externally_managed_app_install_task.cc
index 3e699e5..25b92aa0 100644
--- a/chrome/browser/web_applications/externally_managed_app_install_task.cc
+++ b/chrome/browser/web_applications/externally_managed_app_install_task.cc
@@ -234,7 +234,7 @@
return;
}

- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
web_app_info.title =
install_options_.placeholder_name
? base::UTF8ToUTF16(install_options_.placeholder_name.value())
diff --git a/chrome/browser/web_applications/externally_managed_app_install_task.h b/chrome/browser/web_applications/externally_managed_app_install_task.h
index 60bb620..fb9eb88 100644
--- a/chrome/browser/web_applications/externally_managed_app_install_task.h
+++ b/chrome/browser/web_applications/externally_managed_app_install_task.h
@@ -71,7 +71,7 @@
const ExternalInstallOptions& install_options() { return install_options_; }

private:
- // Install directly from a fully specified WebApplicationInfo struct. Used
+ // Install directly from a fully specified WebAppInstallInfo struct. Used
// by system apps.
void InstallFromInfo(ResultCallback result_callback);

diff --git a/chrome/browser/web_applications/externally_managed_app_manager_impl_unittest.cc b/chrome/browser/web_applications/externally_managed_app_manager_impl_unittest.cc
index 6d9a6d8..1e1ceb4 100644
--- a/chrome/browser/web_applications/externally_managed_app_manager_impl_unittest.cc
+++ b/chrome/browser/web_applications/externally_managed_app_manager_impl_unittest.cc
@@ -60,9 +60,9 @@
return options;
}

-std::unique_ptr<WebApplicationInfo> GetWebApplicationInfo(const GURL& url) {
- std::unique_ptr<WebApplicationInfo> info =
- std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> GetWebAppInstallInfo(const GURL& url) {
+ std::unique_ptr<WebAppInstallInfo> info =
+ std::make_unique<WebAppInstallInfo>();
info->start_url = url;
info->scope = url.GetWithoutFilename();
info->title = u"Foo Web App";
@@ -78,8 +78,8 @@
options.only_use_app_info_factory = true;
// Static to ensure re-use across multiple function calls for
// ExternalInstallOptions equality checking.
- static WebApplicationInfoFactory app_info_factory =
- base::BindRepeating(&GetWebApplicationInfo, url);
+ static WebAppInstallInfoFactory app_info_factory =
+ base::BindRepeating(&GetWebAppInstallInfo, url);
options.app_info_factory = app_info_factory;

if (override_previous_user_uninstall.has_value())
diff --git a/chrome/browser/web_applications/manifest_update_task.h b/chrome/browser/web_applications/manifest_update_task.h
index 54e1f13..555447d 100644
--- a/chrome/browser/web_applications/manifest_update_task.h
+++ b/chrome/browser/web_applications/manifest_update_task.h
@@ -237,7 +237,7 @@
raw_ptr<WebAppSyncBridge> sync_bridge_ = nullptr;

Stage stage_;
- absl::optional<WebApplicationInfo> web_application_info_;
+ absl::optional<WebAppInstallInfo> web_application_info_;
absl::optional<WebAppIconDownloader> icon_downloader_;

// Two KeepAlive objects, to make sure in progress manifest updates survive
diff --git a/chrome/browser/web_applications/os_integration_manager.cc b/chrome/browser/web_applications/os_integration_manager.cc
index 32f4667..754742e 100644
--- a/chrome/browser/web_applications/os_integration_manager.cc
+++ b/chrome/browser/web_applications/os_integration_manager.cc
@@ -158,7 +158,7 @@
void OsIntegrationManager::InstallOsHooks(
const AppId& app_id,
InstallOsHooksCallback callback,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
InstallOsHooksOptions options) {
if (g_suppress_os_hooks_for_testing_) {
OsHooksErrors os_hooks_errors;
@@ -272,7 +272,7 @@
const AppId& app_id,
base::StringPiece old_name,
FileHandlerUpdateAction file_handlers_need_os_update,
- const WebApplicationInfo& web_app_info,
+ const WebAppInstallInfo& web_app_info,
UpdateOsHooksCallback callback) {
if (g_suppress_os_hooks_for_testing_) {
OsHooksErrors os_hooks_errors;
@@ -603,7 +603,7 @@

void OsIntegrationManager::UpdateShortcutsMenu(
const AppId& app_id,
- const WebApplicationInfo& web_app_info) {
+ const WebAppInstallInfo& web_app_info) {
DCHECK(shortcut_manager_);
if (web_app_info.shortcuts_menu_item_infos.empty()) {
shortcut_manager_->UnregisterShortcutsMenuWithOs(app_id);
@@ -750,7 +750,7 @@

void OsIntegrationManager::OnShortcutsCreated(
const AppId& app_id,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
InstallOsHooksOptions options,
scoped_refptr<OsHooksBarrier> barrier,
bool shortcuts_created) {
diff --git a/chrome/browser/web_applications/os_integration_manager.h b/chrome/browser/web_applications/os_integration_manager.h
index ba35364..7654a8c 100644
--- a/chrome/browser/web_applications/os_integration_manager.h
+++ b/chrome/browser/web_applications/os_integration_manager.h
@@ -112,7 +112,7 @@
// virtual for testing
virtual void InstallOsHooks(const AppId& app_id,
InstallOsHooksCallback callback,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
InstallOsHooksOptions options);

// Uninstall specific OS hooks for the web app.
@@ -136,7 +136,7 @@
const AppId& app_id,
base::StringPiece old_name,
FileHandlerUpdateAction file_handlers_need_os_update,
- const WebApplicationInfo& web_app_info,
+ const WebAppInstallInfo& web_app_info,
UpdateOsHooksCallback callback);

// Proxy calls for WebAppShortcutManager.
@@ -274,7 +274,7 @@
base::StringPiece old_name,
base::OnceClosure callback);
virtual void UpdateShortcutsMenu(const AppId& app_id,
- const WebApplicationInfo& web_app_info);
+ const WebAppInstallInfo& web_app_info);

// Utility methods:
virtual std::unique_ptr<ShortcutInfo> BuildShortcutInfo(const AppId& app_id);
@@ -283,7 +283,7 @@
class OsHooksBarrier;

void OnShortcutsCreated(const AppId& app_id,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
InstallOsHooksOptions options,
scoped_refptr<OsHooksBarrier> barrier,
bool shortcuts_created);
diff --git a/chrome/browser/web_applications/os_integration_manager_unittest.cc b/chrome/browser/web_applications/os_integration_manager_unittest.cc
index e4df46b..d546939 100644
--- a/chrome/browser/web_applications/os_integration_manager_unittest.cc
+++ b/chrome/browser/web_applications/os_integration_manager_unittest.cc
@@ -193,7 +193,7 @@
const AppId app_id = "test";
testing::StrictMock<MockOsIntegrationManager> manager;

- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
base::StringPiece old_name = "test-name";

EXPECT_CALL(
diff --git a/chrome/browser/web_applications/preinstalled_web_app_manager_browsertest.cc b/chrome/browser/web_applications/preinstalled_web_app_manager_browsertest.cc
index 1acea4f..2b6d0c45 100644
--- a/chrome/browser/web_applications/preinstalled_web_app_manager_browsertest.cc
+++ b/chrome/browser/web_applications/preinstalled_web_app_manager_browsertest.cc
@@ -994,7 +994,7 @@
GenerateAppId(/*manifest_id=*/absl::nullopt, preinstalled_app_start_url);

// Install user app.
- auto web_application_info = std::make_unique<WebApplicationInfo>();
+ auto web_application_info = std::make_unique<WebAppInstallInfo>();
web_application_info->start_url = user_app_start_url;
web_application_info->title = u"Test user app";
AppId user_app_id =
diff --git a/chrome/browser/web_applications/preinstalled_web_app_manager_unittest.cc b/chrome/browser/web_applications/preinstalled_web_app_manager_unittest.cc
index 70a4e54..b29fde17 100644
--- a/chrome/browser/web_applications/preinstalled_web_app_manager_unittest.cc
+++ b/chrome/browser/web_applications/preinstalled_web_app_manager_unittest.cc
@@ -240,7 +240,7 @@
options.uninstall_and_replace = {kExtensionId};
options.only_use_app_info_factory = true;
options.app_info_factory = base::BindRepeating(
- []() { return std::make_unique<WebApplicationInfo>(); });
+ []() { return std::make_unique<WebAppInstallInfo>(); });
preinstalled_web_app_override_.apps.push_back(std::move(options));

auto expect_present = [&]() {
diff --git a/chrome/browser/web_applications/preinstalled_web_app_migration_browsertest.cc b/chrome/browser/web_applications/preinstalled_web_app_migration_browsertest.cc
index 84b2b46..945c0cc 100644
--- a/chrome/browser/web_applications/preinstalled_web_app_migration_browsertest.cc
+++ b/chrome/browser/web_applications/preinstalled_web_app_migration_browsertest.cc
@@ -648,7 +648,7 @@
options.uninstall_and_replace.push_back(kExtensionId);
options.only_use_app_info_factory = true;
options.app_info_factory = base::BindLambdaForTesting([&]() {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = GetWebAppUrl();
info->title = u"Test app";
return info;
diff --git a/chrome/browser/web_applications/preinstalled_web_app_utils.cc b/chrome/browser/web_applications/preinstalled_web_app_utils.cc
index badabea..921499a 100644
--- a/chrome/browser/web_applications/preinstalled_web_app_utils.cc
+++ b/chrome/browser/web_applications/preinstalled_web_app_utils.cc
@@ -382,14 +382,14 @@
// offline_manifest
value = app_config.FindDictKey(kOfflineManifest);
if (value) {
- WebApplicationInfoFactoryOrError offline_manifest_result =
+ WebAppInstallInfoFactoryOrError offline_manifest_result =
ParseOfflineManifest(file_utils, dir, file, *value);
if (std::string* error =
absl::get_if<std::string>(&offline_manifest_result)) {
return std::move(*error);
}
- options.app_info_factory = std::move(
- absl::get<WebApplicationInfoFactory>(offline_manifest_result));
+ options.app_info_factory =
+ std::move(absl::get<WebAppInstallInfoFactory>(offline_manifest_result));
}

if (options.only_use_app_info_factory && !options.app_info_factory) {
@@ -430,12 +430,12 @@
return options;
}

-WebApplicationInfoFactoryOrError ParseOfflineManifest(
+WebAppInstallInfoFactoryOrError ParseOfflineManifest(
FileUtilsWrapper& file_utils,
const base::FilePath& dir,
const base::FilePath& file,
const base::Value& offline_manifest) {
- WebApplicationInfo app_info;
+ WebAppInstallInfo app_info;

// name
const std::string* name_string =
@@ -562,7 +562,7 @@
}

return base::BindRepeating(
- &std::make_unique<WebApplicationInfo, const WebApplicationInfo&>,
+ &std::make_unique<WebAppInstallInfo, const WebAppInstallInfo&>,
std::move(app_info));
}

diff --git a/chrome/browser/web_applications/preinstalled_web_app_utils.h b/chrome/browser/web_applications/preinstalled_web_app_utils.h
index 3d4eb3b..236372f 100644
--- a/chrome/browser/web_applications/preinstalled_web_app_utils.h
+++ b/chrome/browser/web_applications/preinstalled_web_app_utils.h
@@ -29,10 +29,10 @@
const base::FilePath& file,
const base::Value& app_config);

-using WebApplicationInfoFactoryOrError =
- absl::variant<WebApplicationInfoFactory, std::string>;
+using WebAppInstallInfoFactoryOrError =
+ absl::variant<WebAppInstallInfoFactory, std::string>;

-WebApplicationInfoFactoryOrError ParseOfflineManifest(
+WebAppInstallInfoFactoryOrError ParseOfflineManifest(
FileUtilsWrapper& file_utils,
const base::FilePath& dir,
const base::FilePath& file,
diff --git a/chrome/browser/web_applications/preinstalled_web_app_utils_unittest.cc b/chrome/browser/web_applications/preinstalled_web_app_utils_unittest.cc
index 4adefd6..fbb37ad0 100644
--- a/chrome/browser/web_applications/preinstalled_web_app_utils_unittest.cc
+++ b/chrome/browser/web_applications/preinstalled_web_app_utils_unittest.cc
@@ -57,17 +57,17 @@
return absl::nullopt;
}

- absl::optional<WebApplicationInfoFactory> ParseOfflineManifest(
+ absl::optional<WebAppInstallInfoFactory> ParseOfflineManifest(
const char* offline_manifest_string) {
absl::optional<base::Value> offline_manifest =
base::JSONReader::Read(offline_manifest_string);
DCHECK(offline_manifest);
- WebApplicationInfoFactoryOrError result = ::web_app::ParseOfflineManifest(
+ WebAppInstallInfoFactoryOrError result = ::web_app::ParseOfflineManifest(
*file_utils_, base::FilePath(FILE_PATH_LITERAL("test_dir")),
base::FilePath(FILE_PATH_LITERAL("test_dir/test.json")),
*offline_manifest);
- if (WebApplicationInfoFactory* factory =
- absl::get_if<WebApplicationInfoFactory>(&result)) {
+ if (WebAppInstallInfoFactory* factory =
+ absl::get_if<WebAppInstallInfoFactory>(&result)) {
return std::move(*factory);
}
return absl::nullopt;
@@ -186,7 +186,7 @@
#define MAYBE_OfflineManifestValid OfflineManifestValid
#endif
TEST_F(PreinstalledWebAppUtilsTest, MAYBE_OfflineManifestValid) {
- std::unique_ptr<WebApplicationInfo> app_info = ParseOfflineManifest(R"(
+ std::unique_ptr<WebAppInstallInfo> app_info = ParseOfflineManifest(R"(
{
"name": "Test App",
"start_url": "https://test.org/start.html",
@@ -196,8 +196,8 @@
"theme_color_argb_hex": "AABBCCDD"
}
)")
- .value()
- .Run();
+ .value()
+ .Run();
EXPECT_TRUE(app_info);
EXPECT_EQ(app_info->title, u"Test App");
EXPECT_EQ(app_info->start_url, GURL("https://test.org/start.html"));
diff --git a/chrome/browser/web_applications/preinstalled_web_apps/gmail.cc b/chrome/browser/web_applications/preinstalled_web_apps/gmail.cc
index 0fbde90e..3cf0477 100644
--- a/chrome/browser/web_applications/preinstalled_web_apps/gmail.cc
+++ b/chrome/browser/web_applications/preinstalled_web_apps/gmail.cc
@@ -31,7 +31,7 @@
options.load_and_await_service_worker_registration = false;
options.only_use_app_info_factory = true;
options.app_info_factory = base::BindRepeating([]() {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->title = u"Gmail";
info->start_url =
GURL("https://mail.google.com/mail/?usp=installed_webapp");
diff --git a/chrome/browser/web_applications/preinstalled_web_apps/google_calendar.cc b/chrome/browser/web_applications/preinstalled_web_apps/google_calendar.cc
index f50c31f..cfc8460 100644
--- a/chrome/browser/web_applications/preinstalled_web_apps/google_calendar.cc
+++ b/chrome/browser/web_applications/preinstalled_web_apps/google_calendar.cc
@@ -116,7 +116,7 @@

options.only_use_app_info_factory = true;
options.app_info_factory = base::BindRepeating([]() {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->title = base::UTF8ToUTF16(
GetTranslatedName("Google Calendar", kNameTranslations));
info->start_url = GURL("https://calendar.google.com/calendar/r");
diff --git a/chrome/browser/web_applications/preinstalled_web_apps/google_docs.cc b/chrome/browser/web_applications/preinstalled_web_apps/google_docs.cc
index 501b14a..18ae159 100644
--- a/chrome/browser/web_applications/preinstalled_web_apps/google_docs.cc
+++ b/chrome/browser/web_applications/preinstalled_web_apps/google_docs.cc
@@ -110,7 +110,7 @@
options.load_and_await_service_worker_registration = false;
options.only_use_app_info_factory = true;
options.app_info_factory = base::BindRepeating([]() {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->title =
base::UTF8ToUTF16(GetTranslatedName("Docs", kNameTranslations));
info->start_url =
diff --git a/chrome/browser/web_applications/preinstalled_web_apps/google_drive.cc b/chrome/browser/web_applications/preinstalled_web_apps/google_drive.cc
index 077a311..d92e62c8 100644
--- a/chrome/browser/web_applications/preinstalled_web_apps/google_drive.cc
+++ b/chrome/browser/web_applications/preinstalled_web_apps/google_drive.cc
@@ -115,7 +115,7 @@

options.only_use_app_info_factory = true;
options.app_info_factory = base::BindRepeating([]() {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->title =
base::UTF8ToUTF16(GetTranslatedName("Google Drive", kNameTranslations));
info->start_url = GURL("https://drive.google.com/?lfhs=2");
diff --git a/chrome/browser/web_applications/preinstalled_web_apps/google_sheets.cc b/chrome/browser/web_applications/preinstalled_web_apps/google_sheets.cc
index caf8007c8..22b5bcc 100644
--- a/chrome/browser/web_applications/preinstalled_web_apps/google_sheets.cc
+++ b/chrome/browser/web_applications/preinstalled_web_apps/google_sheets.cc
@@ -108,7 +108,7 @@
options.load_and_await_service_worker_registration = false;
options.only_use_app_info_factory = true;
options.app_info_factory = base::BindRepeating([]() {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->title =
base::UTF8ToUTF16(GetTranslatedName("Sheets", kNameTranslations));

diff --git a/chrome/browser/web_applications/preinstalled_web_apps/google_slides.cc b/chrome/browser/web_applications/preinstalled_web_apps/google_slides.cc
index d82732e..dd13475 100644
--- a/chrome/browser/web_applications/preinstalled_web_apps/google_slides.cc
+++ b/chrome/browser/web_applications/preinstalled_web_apps/google_slides.cc
@@ -108,7 +108,7 @@
options.load_and_await_service_worker_registration = false;
options.only_use_app_info_factory = true;
options.app_info_factory = base::BindRepeating([]() {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->title =
base::UTF8ToUTF16(GetTranslatedName("Slides", kNameTranslations));
info->start_url =
diff --git a/chrome/browser/web_applications/preinstalled_web_apps/youtube.cc b/chrome/browser/web_applications/preinstalled_web_apps/youtube.cc
index b5583db..149bc1d 100644
--- a/chrome/browser/web_applications/preinstalled_web_apps/youtube.cc
+++ b/chrome/browser/web_applications/preinstalled_web_apps/youtube.cc
@@ -32,7 +32,7 @@
options.load_and_await_service_worker_registration = false;
options.only_use_app_info_factory = true;
options.app_info_factory = base::BindRepeating([]() {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->title = u"YouTube";
info->start_url = GURL("https://www.youtube.com/?feature=ytca");
info->scope = GURL("https://www.youtube.com/");
diff --git a/chrome/browser/web_applications/system_web_apps/README.md b/chrome/browser/web_applications/system_web_apps/README.md
index 5212f52..53d9eb7 100644
--- a/chrome/browser/web_applications/system_web_apps/README.md
+++ b/chrome/browser/web_applications/system_web_apps/README.md
@@ -19,7 +19,7 @@

## Installation
System Web Apps are installed on startup using the Web Apps installation pipeline. The key differences are:
-* SWAs don’t use the html->manifest path at all. They are installed directly by creating a WebApplicationInfo object directly in C++ code, and skipping much of the installation process.
+* SWAs don’t use the html->manifest path at all. They are installed directly by creating a WebAppInstallInfo object directly in C++ code, and skipping much of the installation process.
* The SWAs are checked for installation or upgrade on boot, and re-installed up to the current version of ChromeOS.

## Serving Resources
diff --git a/chrome/browser/web_applications/system_web_apps/system_web_app_delegate.h b/chrome/browser/web_applications/system_web_apps/system_web_app_delegate.h
index 5d603ab..fa10b87 100644
--- a/chrome/browser/web_applications/system_web_apps/system_web_app_delegate.h
+++ b/chrome/browser/web_applications/system_web_apps/system_web_app_delegate.h
@@ -42,7 +42,7 @@
// their application, overriding GetWebAppInfo(), and other methods as needed.
class SystemWebAppDelegate {
public:
- // When installing via a WebApplicationInfo, the url is never loaded. It's
+ // When installing via a WebAppInstallInfo, the url is never loaded. It's
// needed only for various legacy reasons, maps for tracking state, and
// generating the AppId and things of that nature.
SystemWebAppDelegate(
@@ -67,8 +67,8 @@
// The URL that the System App will be installed from.
const GURL& GetInstallUrl() const { return install_url_; }

- // Returns a WebApplicationInfo struct to complete installation.
- virtual std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const = 0;
+ // Returns a WebAppInstallInfo struct to complete installation.
+ virtual std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const = 0;

// If specified, the apps in |uninstall_and_replace| will have their data
// migrated to this System App.
diff --git a/chrome/browser/web_applications/system_web_apps/test/system_web_app_manager_unittest.cc b/chrome/browser/web_applications/system_web_apps/test/system_web_app_manager_unittest.cc
index fb0026d..a6f182d 100644
--- a/chrome/browser/web_applications/system_web_apps/test/system_web_app_manager_unittest.cc
+++ b/chrome/browser/web_applications/system_web_apps/test/system_web_app_manager_unittest.cc
@@ -71,24 +71,24 @@
return GURL(content::GetWebUIURL("system-app2"));
}

-std::unique_ptr<WebApplicationInfo> GetWebApplicationInfo(const GURL& url) {
- std::unique_ptr<WebApplicationInfo> info =
- std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> GetWebAppInstallInfo(const GURL& url) {
+ std::unique_ptr<WebAppInstallInfo> info =
+ std::make_unique<WebAppInstallInfo>();
info->start_url = url;
info->scope = url.GetWithoutFilename();
info->title = u"Web App";
return info;
}

-WebApplicationInfoFactory GetApp1WebAppInfoFactory() {
+WebAppInstallInfoFactory GetApp1WebAppInfoFactory() {
// "static" so that ExternalInstallOptions comparisons in tests work.
- static auto factory = base::BindRepeating(&GetWebApplicationInfo, AppUrl1());
+ static auto factory = base::BindRepeating(&GetWebAppInstallInfo, AppUrl1());
return factory;
}

-WebApplicationInfoFactory GetApp2WebAppInfoFactory() {
+WebAppInstallInfoFactory GetApp2WebAppInfoFactory() {
// "static" so that ExternalInstallOptions comparisons in tests work.
- static auto factory = base::BindRepeating(&GetWebApplicationInfo, AppUrl2());
+ static auto factory = base::BindRepeating(&GetWebAppInstallInfo, AppUrl2());
return factory;
}

@@ -459,7 +459,7 @@
SystemAppType::SETTINGS,
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::SETTINGS, kSettingsAppInternalName, kAppUrl3,
- base::BindRepeating(&GetWebApplicationInfo, kAppUrl3)));
+ base::BindRepeating(&GetWebAppInstallInfo, kAppUrl3)));

system_apps.emplace(SystemAppType::CAMERA,
std::make_unique<UnittestingSystemAppDelegate>(
@@ -1046,7 +1046,7 @@
TimerSystemAppDelegate(SystemAppType type,
const std::string& name,
const GURL& url,
- WebApplicationInfoFactory info_factory,
+ WebAppInstallInfoFactory info_factory,
absl::optional<base::TimeDelta> period,
bool open_immediately)
: UnittestingSystemAppDelegate(type, name, url, info_factory),
@@ -1363,7 +1363,7 @@
SystemAppType::SETTINGS,
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::SETTINGS, kSettingsAppInternalName, AppUrl1(),
- base::BindRepeating(&GetWebApplicationInfo, AppUrl1())));
+ base::BindRepeating(&GetWebAppInstallInfo, AppUrl1())));
system_web_app_manager().SetSystemAppsForTesting(std::move(system_apps));

base::RunLoop run_loop;
diff --git a/chrome/browser/web_applications/system_web_apps/test/test_system_web_app_installation.cc b/chrome/browser/web_applications/system_web_apps/test/test_system_web_app_installation.cc
index 1ec28f3..a1946e2 100644
--- a/chrome/browser/web_applications/system_web_apps/test/test_system_web_app_installation.cc
+++ b/chrome/browser/web_applications/system_web_apps/test/test_system_web_app_installation.cc
@@ -90,14 +90,14 @@
SystemAppType type,
const std::string& name,
const GURL& url,
- WebApplicationInfoFactory info_factory)
+ WebAppInstallInfoFactory info_factory)
: web_app::SystemWebAppDelegate(type, name, url, nullptr),
info_factory_(info_factory) {}

UnittestingSystemAppDelegate::~UnittestingSystemAppDelegate() = default;

-std::unique_ptr<WebApplicationInfo>
-UnittestingSystemAppDelegate::GetWebAppInfo() const {
+std::unique_ptr<WebAppInstallInfo> UnittestingSystemAppDelegate::GetWebAppInfo()
+ const {
return info_factory_.Run();
}

@@ -276,8 +276,8 @@

TestSystemWebAppInstallation::~TestSystemWebAppInstallation() = default;

-std::unique_ptr<WebApplicationInfo> GenerateWebApplicationInfoForTestApp() {
- auto info = std::make_unique<WebApplicationInfo>();
+std::unique_ptr<WebAppInstallInfo> GenerateWebAppInstallInfoForTestApp() {
+ auto info = std::make_unique<WebAppInstallInfo>();
// the pwa.html is arguably wrong, but the manifest version uses it
// incorrectly as well, and it's a lot of work to fix it. App ids are
// generated from this, and it's important to keep it stable across the
@@ -291,9 +291,9 @@
return info;
}

-std::unique_ptr<WebApplicationInfo>
-GenerateWebApplicationInfoForTestAppUntrusted() {
- auto info = GenerateWebApplicationInfoForTestApp();
+std::unique_ptr<WebAppInstallInfo>
+GenerateWebAppInstallInfoForTestAppUntrusted() {
+ auto info = GenerateWebAppInstallInfoForTestApp();
info->start_url = GURL("chrome-untrusted://test-system-app/pwa.html");
info->scope = GURL("chrome-untrusted://test-system-app/");
return info;
@@ -312,7 +312,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::TERMINAL, "Terminal",
GURL("chrome://test-system-app/pwa.html"),
- base::BindRepeating(&GenerateWebApplicationInfoForTestApp));
+ base::BindRepeating(&GenerateWebAppInstallInfoForTestApp));
delegate->SetShouldReuseExistingWindow(false);
delegate->SetShouldHaveTabStrip(true);

@@ -327,7 +327,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::SETTINGS, "OSSettings",
GURL("chrome://test-system-app/pwa.html"),
- base::BindRepeating(&GenerateWebApplicationInfoForTestApp));
+ base::BindRepeating(&GenerateWebAppInstallInfoForTestApp));
delegate->SetUrlInSystemAppScope(GURL("http://example.com/in-scope"));

return base::WrapUnique(
@@ -342,7 +342,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::MEDIA, "Media",
GURL("chrome://test-system-app/pwa.html"),
- base::BindRepeating(&GenerateWebApplicationInfoForTestApp));
+ base::BindRepeating(&GenerateWebAppInstallInfoForTestApp));

if (include_launch_directory == IncludeLaunchDirectory::kYes) {
delegate->SetShouldIncludeLaunchDirectory(true);
@@ -365,7 +365,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::MEDIA, "Media",
GURL("chrome://test-system-app/pwa.html"),
- base::BindRepeating(&GenerateWebApplicationInfoForTestApp));
+ base::BindRepeating(&GenerateWebAppInstallInfoForTestApp));

delegate->SetEnabledOriginTrials(origin_to_trials);
return base::WrapUnique(
@@ -379,7 +379,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::MEDIA, "Test",
GURL("chrome://test-system-app/pwa.html"),
- base::BindRepeating(&GenerateWebApplicationInfoForTestApp));
+ base::BindRepeating(&GenerateWebAppInstallInfoForTestApp));

delegate->SetShouldShowInLauncher(false);

@@ -394,7 +394,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::MEDIA, "Test",
GURL("chrome://test-system-app/pwa.html"),
- base::BindRepeating(&GenerateWebApplicationInfoForTestApp));
+ base::BindRepeating(&GenerateWebAppInstallInfoForTestApp));
delegate->SetShouldShowInSearch(false);

return base::WrapUnique(
@@ -408,7 +408,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::MEDIA, "Test",
GURL("chrome://test-system-app/pwa.html"),
- base::BindRepeating(&GenerateWebApplicationInfoForTestApp));
+ base::BindRepeating(&GenerateWebAppInstallInfoForTestApp));
delegate->SetShouldHandleFileOpenIntents(true);

return base::WrapUnique(
@@ -422,7 +422,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::MEDIA, "Test",
GURL("chrome://test-system-app/pwa.html"),
- base::BindRepeating(&GenerateWebApplicationInfoForTestApp));
+ base::BindRepeating(&GenerateWebAppInstallInfoForTestApp));
delegate->SetAdditionalSearchTerms({IDS_SETTINGS_SECURITY});

return base::WrapUnique(
@@ -436,7 +436,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::HELP, "Test",
GURL("chrome://test-system-app/pwa.html"),
- base::BindRepeating(&GenerateWebApplicationInfoForTestApp));
+ base::BindRepeating(&GenerateWebAppInstallInfoForTestApp));
delegate->SetShouldCaptureNavigations(true);

auto* installation = new TestSystemWebAppInstallation(std::move(delegate));
@@ -448,7 +448,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::SETTINGS, "Initiating App", kInitiatingAppUrl,
base::BindLambdaForTesting([]() {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
// the pwa.html is arguably wrong, but the manifest
// version uses it incorrectly as well, and it's a lot of
// work to fix it. App ids are generated from this, and
@@ -476,8 +476,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::SETTINGS, "Test",
GURL("chrome-untrusted://test-system-app/pwa.html"),
- base::BindRepeating(
- &GenerateWebApplicationInfoForTestAppUntrusted))));
+ base::BindRepeating(&GenerateWebAppInstallInfoForTestAppUntrusted))));
}

// static
@@ -487,7 +486,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::MEDIA, "Test",
GURL("chrome://test-system-app/pwa.html"),
- base::BindRepeating(&GenerateWebApplicationInfoForTestApp));
+ base::BindRepeating(&GenerateWebAppInstallInfoForTestApp));
delegate->SetShouldAllowResize(false);
delegate->SetShouldAllowMaximize(false);

@@ -502,7 +501,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::MEDIA, "Test",
GURL("chrome://test-system-app/pwa.html"),
- base::BindRepeating(&GenerateWebApplicationInfoForTestApp));
+ base::BindRepeating(&GenerateWebAppInstallInfoForTestApp));

SystemAppBackgroundTaskInfo background_task(
base::Days(1), GURL("chrome://test-system-app/page2.html"), true);
@@ -520,7 +519,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::MEDIA, "Test",
GURL("chrome://test-system-app/pwa.html"),
- base::BindRepeating(&GenerateWebApplicationInfoForTestApp));
+ base::BindRepeating(&GenerateWebAppInstallInfoForTestApp));
/* The default value of allow_scripts_to_close_windows is false. */
if (value) {
delegate->SetShouldAllowScriptsToCloseWindows(value);
@@ -536,7 +535,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::MEDIA, "Test",
GURL("chrome://test-system-app/pwa.html"),
- base::BindRepeating(&GenerateWebApplicationInfoForTestApp));
+ base::BindRepeating(&GenerateWebAppInstallInfoForTestApp));
delegate->SetShouldHaveTabStrip(has_tab_strip);

return base::WrapUnique(
@@ -551,7 +550,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::MEDIA, "Test",
GURL("chrome://test-system-app/pwa.html"),
- base::BindRepeating(&GenerateWebApplicationInfoForTestApp));
+ base::BindRepeating(&GenerateWebAppInstallInfoForTestApp));
delegate->SetDefaultBounds(
base::BindLambdaForTesting([&](Browser*) { return default_bounds; }));

@@ -566,7 +565,7 @@
std::make_unique<UnittestingSystemAppDelegate>(
SystemAppType::FILE_MANAGER, "Test",
GURL("chrome://test-system-app/pwa.html"),
- base::BindRepeating(&GenerateWebApplicationInfoForTestApp));
+ base::BindRepeating(&GenerateWebAppInstallInfoForTestApp));
delegate->SetShouldShowNewWindowMenuOption(true);
delegate->SetShouldReuseExistingWindow(false);

@@ -582,8 +581,8 @@
SystemAppType::SHORTCUT_CUSTOMIZATION, "Shortcuts",
GURL("chrome://test-system-app/pwa.html"),
base::BindLambdaForTesting([]() {
- std::unique_ptr<WebApplicationInfo> info =
- GenerateWebApplicationInfoForTestApp();
+ std::unique_ptr<WebAppInstallInfo> info =
+ GenerateWebAppInstallInfoForTestApp();
info->title = u"Shortcuts";
{
WebAppShortcutsMenuItemInfo menu_item;
@@ -619,7 +618,7 @@
SystemWebAppWindowConfig window_config) {
auto* delegate = new UnittestingSystemAppDelegate(
type, "Test App", app_url, base::BindLambdaForTesting([=]() {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = app_url;
info->scope = app_url.DeprecatedGetOriginAsURL();
info->title = u"Test System App";
diff --git a/chrome/browser/web_applications/system_web_apps/test/test_system_web_app_installation.h b/chrome/browser/web_applications/system_web_apps/test/test_system_web_app_installation.h
index 4d573c7c..db9a37c 100644
--- a/chrome/browser/web_applications/system_web_apps/test/test_system_web_app_installation.h
+++ b/chrome/browser/web_applications/system_web_apps/test/test_system_web_app_installation.h
@@ -23,13 +23,13 @@
UnittestingSystemAppDelegate(SystemAppType type,
const std::string& name,
const GURL& url,
- WebApplicationInfoFactory info_factory);
+ WebAppInstallInfoFactory info_factory);
UnittestingSystemAppDelegate(const UnittestingSystemAppDelegate&) = delete;
UnittestingSystemAppDelegate& operator=(const UnittestingSystemAppDelegate&) =
delete;
~UnittestingSystemAppDelegate() override;

- std::unique_ptr<WebApplicationInfo> GetWebAppInfo() const override;
+ std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override;

std::vector<AppId> GetAppIdsToUninstallAndReplace() const override;
gfx::Size GetMinimumWindowSize() const override;
@@ -73,7 +73,7 @@
void SetUrlInSystemAppScope(const GURL& url);

private:
- WebApplicationInfoFactory info_factory_;
+ WebAppInstallInfoFactory info_factory_;

std::vector<AppId> uninstall_and_replace_;
gfx::Size minimum_window_size_;
diff --git a/chrome/browser/web_applications/test/fake_data_retriever.cc b/chrome/browser/web_applications/test/fake_data_retriever.cc
index 18f0e59..8e5d1b2 100644
--- a/chrome/browser/web_applications/test/fake_data_retriever.cc
+++ b/chrome/browser/web_applications/test/fake_data_retriever.cc
@@ -20,9 +20,9 @@
std::move(destruction_callback_).Run();
}

-void FakeDataRetriever::GetWebApplicationInfo(
+void FakeDataRetriever::GetWebAppInstallInfo(
content::WebContents* web_contents,
- GetWebApplicationInfoCallback callback) {
+ GetWebAppInstallInfoCallback callback) {
DCHECK(web_contents);

completion_callback_ =
@@ -58,13 +58,13 @@
icons_http_results_.clear();
}

-void FakeDataRetriever::SetRendererWebApplicationInfo(
- std::unique_ptr<WebApplicationInfo> web_app_info) {
+void FakeDataRetriever::SetRendererWebAppInstallInfo(
+ std::unique_ptr<WebAppInstallInfo> web_app_info) {
web_app_info_ = std::move(web_app_info);
}

-void FakeDataRetriever::SetEmptyRendererWebApplicationInfo() {
- SetRendererWebApplicationInfo(std::make_unique<WebApplicationInfo>());
+void FakeDataRetriever::SetEmptyRendererWebAppInstallInfo() {
+ SetRendererWebAppInstallInfo(std::make_unique<WebAppInstallInfo>());
}

void FakeDataRetriever::SetManifest(blink::mojom::ManifestPtr manifest,
@@ -101,7 +101,7 @@

void FakeDataRetriever::BuildDefaultDataToRetrieve(const GURL& url,
const GURL& scope) {
- SetEmptyRendererWebApplicationInfo();
+ SetEmptyRendererWebAppInstallInfo();

auto manifest = blink::mojom::Manifest::New();
manifest->start_url = url;
diff --git a/chrome/browser/web_applications/test/fake_data_retriever.h b/chrome/browser/web_applications/test/fake_data_retriever.h
index b903e3d..cab1eaf 100644
--- a/chrome/browser/web_applications/test/fake_data_retriever.h
+++ b/chrome/browser/web_applications/test/fake_data_retriever.h
@@ -28,8 +28,8 @@
~FakeDataRetriever() override;

// WebAppDataRetriever:
- void GetWebApplicationInfo(content::WebContents* web_contents,
- GetWebApplicationInfoCallback callback) override;
+ void GetWebAppInstallInfo(content::WebContents* web_contents,
+ GetWebAppInstallInfoCallback callback) override;
void CheckInstallabilityAndRetrieveManifest(
content::WebContents* web_contents,
bool bypass_service_worker_check,
@@ -39,10 +39,10 @@
bool skip_page_favicons,
GetIconsCallback callback) override;

- // Set info to respond on |GetWebApplicationInfo|.
- void SetRendererWebApplicationInfo(
- std::unique_ptr<WebApplicationInfo> web_app_info);
- void SetEmptyRendererWebApplicationInfo();
+ // Set info to respond on |GetWebAppInstallInfo|.
+ void SetRendererWebAppInstallInfo(
+ std::unique_ptr<WebAppInstallInfo> web_app_info);
+ void SetEmptyRendererWebAppInstallInfo();
// Set arguments to respond on |CheckInstallabilityAndRetrieveManifest|.
void SetManifest(blink::mojom::ManifestPtr manifest,
bool is_installable,
@@ -63,7 +63,7 @@

void SetDestructionCallback(base::OnceClosure callback);

- WebApplicationInfo& web_app_info() { return *web_app_info_; }
+ WebAppInstallInfo& web_app_info() { return *web_app_info_; }

// Builds minimal data for install to succeed. Data includes: empty renderer
// info, manifest with |url| and |scope|, installability checked as |true|,
@@ -75,7 +75,7 @@
void CallCompletionCallback();

base::OnceClosure completion_callback_;
- std::unique_ptr<WebApplicationInfo> web_app_info_;
+ std::unique_ptr<WebAppInstallInfo> web_app_info_;

blink::mojom::ManifestPtr manifest_;
GURL manifest_url_;
diff --git a/chrome/browser/web_applications/test/fake_install_finalizer.cc b/chrome/browser/web_applications/test/fake_install_finalizer.cc
index 707fe6c..d536b3b 100644
--- a/chrome/browser/web_applications/test/fake_install_finalizer.cc
+++ b/chrome/browser/web_applications/test/fake_install_finalizer.cc
@@ -32,7 +32,7 @@
FakeInstallFinalizer::~FakeInstallFinalizer() = default;

void FakeInstallFinalizer::FinalizeInstall(
- const WebApplicationInfo& web_app_info,
+ const WebAppInstallInfo& web_app_info,
const FinalizeOptions& options,
InstallFinalizedCallback callback) {
finalize_options_list_.push_back(options);
@@ -40,9 +40,8 @@
std::move(callback));
}

-void FakeInstallFinalizer::FinalizeUpdate(
- const WebApplicationInfo& web_app_info,
- InstallFinalizedCallback callback) {
+void FakeInstallFinalizer::FinalizeUpdate(const WebAppInstallInfo& web_app_info,
+ InstallFinalizedCallback callback) {
Finalize(web_app_info, InstallResultCode::kSuccessAlreadyInstalled,
std::move(callback));
}
@@ -136,7 +135,7 @@
user_uninstalled_external_apps_.insert(app_id);
}

-void FakeInstallFinalizer::Finalize(const WebApplicationInfo& web_app_info,
+void FakeInstallFinalizer::Finalize(const WebAppInstallInfo& web_app_info,
InstallResultCode code,
InstallFinalizedCallback callback) {
AppId app_id = GetAppIdForUrl(web_app_info.start_url);
@@ -151,7 +150,7 @@
}

// Store input data copies for inspecting in tests.
- web_app_info_copy_ = std::make_unique<WebApplicationInfo>(web_app_info);
+ web_app_info_copy_ = std::make_unique<WebAppInstallInfo>(web_app_info);

base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(std::move(callback), app_id, code));
diff --git a/chrome/browser/web_applications/test/fake_install_finalizer.h b/chrome/browser/web_applications/test/fake_install_finalizer.h
index f9d88d2..48ecf76 100644
--- a/chrome/browser/web_applications/test/fake_install_finalizer.h
+++ b/chrome/browser/web_applications/test/fake_install_finalizer.h
@@ -12,7 +12,7 @@
#include "chrome/browser/web_applications/web_app_install_finalizer.h"
#include "third_party/abseil-cpp/absl/types/optional.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

namespace web_app {

@@ -27,10 +27,10 @@
~FakeInstallFinalizer() override;

// WebAppInstallFinalizer:
- void FinalizeInstall(const WebApplicationInfo& web_app_info,
+ void FinalizeInstall(const WebAppInstallInfo& web_app_info,
const FinalizeOptions& options,
InstallFinalizedCallback callback) override;
- void FinalizeUpdate(const WebApplicationInfo& web_app_info,
+ void FinalizeUpdate(const WebAppInstallInfo& web_app_info,
InstallFinalizedCallback callback) override;
void UninstallExternalWebApp(
const AppId& app_id,
@@ -68,7 +68,7 @@
// simulate that the app was uninstalled previously.
void SimulateExternalAppUninstalledByUser(const AppId& app_id);

- std::unique_ptr<WebApplicationInfo> web_app_info() {
+ std::unique_ptr<WebAppInstallInfo> web_app_info() {
return std::move(web_app_info_copy_);
}

@@ -83,11 +83,11 @@
int num_reparent_tab_calls() { return num_reparent_tab_calls_; }

private:
- void Finalize(const WebApplicationInfo& web_app_info,
+ void Finalize(const WebAppInstallInfo& web_app_info,
InstallResultCode code,
InstallFinalizedCallback callback);

- std::unique_ptr<WebApplicationInfo> web_app_info_copy_;
+ std::unique_ptr<WebAppInstallInfo> web_app_info_copy_;
std::vector<FinalizeOptions> finalize_options_list_;
std::vector<GURL> uninstall_external_web_app_urls_;

diff --git a/chrome/browser/web_applications/test/fake_os_integration_manager.cc b/chrome/browser/web_applications/test/fake_os_integration_manager.cc
index f964bf2..b25dc8d 100644
--- a/chrome/browser/web_applications/test/fake_os_integration_manager.cc
+++ b/chrome/browser/web_applications/test/fake_os_integration_manager.cc
@@ -56,7 +56,7 @@
void FakeOsIntegrationManager::InstallOsHooks(
const AppId& app_id,
InstallOsHooksCallback callback,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
InstallOsHooksOptions options) {
OsHooksErrors os_hooks_errors;

@@ -117,7 +117,7 @@
const AppId& app_id,
base::StringPiece old_name,
FileHandlerUpdateAction file_handlers_need_os_update,
- const WebApplicationInfo& web_app_info,
+ const WebAppInstallInfo& web_app_info,
UninstallOsHooksCallback callback) {
if (file_handlers_need_os_update != FileHandlerUpdateAction::kNoUpdate)
++num_update_file_handlers_calls_;
diff --git a/chrome/browser/web_applications/test/fake_os_integration_manager.h b/chrome/browser/web_applications/test/fake_os_integration_manager.h
index 02360b9..e591607 100644
--- a/chrome/browser/web_applications/test/fake_os_integration_manager.h
+++ b/chrome/browser/web_applications/test/fake_os_integration_manager.h
@@ -31,7 +31,7 @@
// OsIntegrationManager:
void InstallOsHooks(const AppId& app_id,
InstallOsHooksCallback callback,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
InstallOsHooksOptions options) override;
void UninstallOsHooks(const AppId& app_id,
const OsHooksOptions& os_hooks,
@@ -41,7 +41,7 @@
void UpdateOsHooks(const AppId& app_id,
base::StringPiece old_name,
FileHandlerUpdateAction file_handlers_need_os_update,
- const WebApplicationInfo& web_app_info,
+ const WebAppInstallInfo& web_app_info,
UpdateOsHooksCallback callback) override;

size_t num_create_shortcuts_calls() const {
diff --git a/chrome/browser/web_applications/test/mock_os_integration_manager.h b/chrome/browser/web_applications/test/mock_os_integration_manager.h
index 4ee8b98..d66da836 100644
--- a/chrome/browser/web_applications/test/mock_os_integration_manager.h
+++ b/chrome/browser/web_applications/test/mock_os_integration_manager.h
@@ -123,7 +123,7 @@
(override));
MOCK_METHOD(void,
UpdateShortcutsMenu,
- (const AppId& app_id, const WebApplicationInfo& web_app_info),
+ (const AppId& app_id, const WebAppInstallInfo& web_app_info),
(override));
MOCK_METHOD(void,
UpdateUrlHandlers,
diff --git a/chrome/browser/web_applications/test/web_app_icon_test_utils.cc b/chrome/browser/web_applications/test/web_app_icon_test_utils.cc
index a76515b..5142e9f 100644
--- a/chrome/browser/web_applications/test/web_app_icon_test_utils.cc
+++ b/chrome/browser/web_applications/test/web_app_icon_test_utils.cc
@@ -218,8 +218,8 @@
return apps_icon_info;
}

-void AddIconsToWebApplicationInfo(
- WebApplicationInfo* web_application_info,
+void AddIconsToWebAppInstallInfo(
+ WebAppInstallInfo* web_application_info,
const GURL& icons_base_url,
const std::vector<GeneratedIconsInfo>& icons_info) {
for (const GeneratedIconsInfo& info : icons_info) {
diff --git a/chrome/browser/web_applications/test/web_app_icon_test_utils.h b/chrome/browser/web_applications/test/web_app_icon_test_utils.h
index ec62732..03cdaee 100644
--- a/chrome/browser/web_applications/test/web_app_icon_test_utils.h
+++ b/chrome/browser/web_applications/test/web_app_icon_test_utils.h
@@ -94,8 +94,8 @@
IconPurpose purpose,
SquareSizePx size_px);

-void AddIconsToWebApplicationInfo(
- WebApplicationInfo* web_application_info,
+void AddIconsToWebAppInstallInfo(
+ WebAppInstallInfo* web_application_info,
const GURL& icons_base_url,
const std::vector<GeneratedIconsInfo>& icons_info);

diff --git a/chrome/browser/web_applications/test/web_app_install_test_utils.cc b/chrome/browser/web_applications/test/web_app_install_test_utils.cc
index 3d452d5..25bef7fb 100644
--- a/chrome/browser/web_applications/test/web_app_install_test_utils.cc
+++ b/chrome/browser/web_applications/test/web_app_install_test_utils.cc
@@ -60,7 +60,7 @@
const std::string& app_name,
const GURL& start_url) {
const AppId app_id = GenerateAppId(/*manifest_id=*/absl::nullopt, start_url);
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;

web_app_info.start_url = start_url;
web_app_info.scope = start_url;
@@ -90,12 +90,12 @@
}

AppId InstallWebApp(Profile* profile,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
bool overwrite_existing_manifest_fields,
webapps::WebappInstallSource install_source) {
// The sync system requires that sync entity name is never empty.
if (web_app_info->title.empty())
- web_app_info->title = u"WebApplicationInfo App Name";
+ web_app_info->title = u"WebAppInstallInfo App Name";

AppId app_id;
base::RunLoop run_loop;
@@ -125,8 +125,8 @@
const GURL& start_url,
const std::u16string& app_name,
const std::vector<apps::UrlHandlerInfo>& url_handlers) {
- std::unique_ptr<WebApplicationInfo> info =
- std::make_unique<WebApplicationInfo>();
+ std::unique_ptr<WebAppInstallInfo> info =
+ std::make_unique<WebAppInstallInfo>();
info->start_url = start_url;
info->title = app_name;
info->user_display_mode = DisplayMode::kStandalone;
diff --git a/chrome/browser/web_applications/test/web_app_install_test_utils.h b/chrome/browser/web_applications/test/web_app_install_test_utils.h
index 8296a7c9..d1cddec 100644
--- a/chrome/browser/web_applications/test/web_app_install_test_utils.h
+++ b/chrome/browser/web_applications/test/web_app_install_test_utils.h
@@ -45,7 +45,7 @@
// Synchronous version of WebAppInstallManager::InstallWebAppFromInfo. May be
// used in unit tests and browser tests.
AppId InstallWebApp(Profile* profile,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
bool overwrite_existing_manifest_fields = false,
webapps::WebappInstallSource install_source =
webapps::WebappInstallSource::OMNIBOX_INSTALL_ICON);
diff --git a/chrome/browser/web_applications/test/web_app_test_utils.cc b/chrome/browser/web_applications/test/web_app_test_utils.cc
index 4d796c3..4f102a2 100644
--- a/chrome/browser/web_applications/test/web_app_test_utils.cc
+++ b/chrome/browser/web_applications/test/web_app_test_utils.cc
@@ -447,7 +447,7 @@

void TestAcceptDialogCallback(
content::WebContents* initiator_web_contents,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
ForInstallableSite for_installable_site,
WebAppInstallationAcceptanceCallback acceptance_callback) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
@@ -457,7 +457,7 @@

void TestDeclineDialogCallback(
content::WebContents* initiator_web_contents,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
ForInstallableSite for_installable_site,
WebAppInstallationAcceptanceCallback acceptance_callback) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
diff --git a/chrome/browser/web_applications/test/web_app_test_utils.h b/chrome/browser/web_applications/test/web_app_test_utils.h
index 9c414281..c62934844 100644
--- a/chrome/browser/web_applications/test/web_app_test_utils.h
+++ b/chrome/browser/web_applications/test/web_app_test_utils.h
@@ -12,7 +12,7 @@
#include "chrome/browser/web_applications/web_app_install_utils.h"
#include "content/public/browser/service_worker_context.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;
class Browser;
class GURL;

@@ -33,13 +33,13 @@

void TestAcceptDialogCallback(
content::WebContents* initiator_web_contents,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
ForInstallableSite for_installable_site,
WebAppInstallationAcceptanceCallback acceptance_callback);

void TestDeclineDialogCallback(
content::WebContents* initiator_web_contents,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
ForInstallableSite for_installable_site,
WebAppInstallationAcceptanceCallback acceptance_callback);

diff --git a/chrome/browser/web_applications/web_app_constants.cc b/chrome/browser/web_applications/web_app_constants.cc
index e31e1c6..1efe5b4 100644
--- a/chrome/browser/web_applications/web_app_constants.cc
+++ b/chrome/browser/web_applications/web_app_constants.cc
@@ -87,8 +87,8 @@
return os << "kSuccessNewInstall";
case InstallResultCode::kSuccessAlreadyInstalled:
return os << "kSuccessAlreadyInstalled";
- case InstallResultCode::kGetWebApplicationInfoFailed:
- return os << "kGetWebApplicationInfoFailed";
+ case InstallResultCode::kGetWebAppInstallInfoFailed:
+ return os << "kGetWebAppInstallInfoFailed";
case InstallResultCode::kPreviouslyUninstalled:
return os << "kPreviouslyUninstalled";
case InstallResultCode::kWebContentsDestroyed:
diff --git a/chrome/browser/web_applications/web_app_constants.h b/chrome/browser/web_applications/web_app_constants.h
index c7a844f..642e296 100644
--- a/chrome/browser/web_applications/web_app_constants.h
+++ b/chrome/browser/web_applications/web_app_constants.h
@@ -72,7 +72,7 @@

// Failure category:
// An inter-process request to blink renderer failed.
- kGetWebApplicationInfoFailed = 3,
+ kGetWebAppInstallInfoFailed = 3,
// A user previously uninstalled the app, user doesn't want to see it again.
kPreviouslyUninstalled = 4,
// The blink renderer used to install the app was destroyed.
diff --git a/chrome/browser/web_applications/web_app_data_retriever.cc b/chrome/browser/web_applications/web_app_data_retriever.cc
index e681876..48ca382 100644
--- a/chrome/browser/web_applications/web_app_data_retriever.cc
+++ b/chrome/browser/web_applications/web_app_data_retriever.cc
@@ -35,9 +35,9 @@

WebAppDataRetriever::~WebAppDataRetriever() = default;

-void WebAppDataRetriever::GetWebApplicationInfo(
+void WebAppDataRetriever::GetWebAppInstallInfo(
content::WebContents* web_contents,
- GetWebApplicationInfoCallback callback) {
+ GetWebAppInstallInfoCallback callback) {
Observe(web_contents);

// Concurrent calls are not allowed.
@@ -55,7 +55,7 @@

// Makes a copy of WebContents fields right after Commit but before a mojo
// request to the renderer process.
- preinstalled_web_application_info_ = std::make_unique<WebApplicationInfo>();
+ preinstalled_web_application_info_ = std::make_unique<WebAppInstallInfo>();
preinstalled_web_application_info_->start_url =
web_contents->GetLastCommittedURL();
preinstalled_web_application_info_->title = web_contents->GetTitle();
@@ -154,14 +154,14 @@
content::WebContents* contents = web_contents();
Observe(nullptr);

- std::unique_ptr<WebApplicationInfo> info;
+ std::unique_ptr<WebAppInstallInfo> info;

content::NavigationEntry* entry =
contents->GetController().GetLastCommittedEntry();

if (!entry->IsInitialEntry()) {
if (entry->GetUniqueID() == last_committed_nav_entry_unique_id) {
- info = std::make_unique<WebApplicationInfo>(*web_page_metadata);
+ info = std::make_unique<WebAppInstallInfo>(*web_page_metadata);
if (info->start_url.is_empty())
info->start_url =
std::move(preinstalled_web_application_info_->start_url);
diff --git a/chrome/browser/web_applications/web_app_data_retriever.h b/chrome/browser/web_applications/web_app_data_retriever.h
index df3f8d4..1907fb51 100644
--- a/chrome/browser/web_applications/web_app_data_retriever.h
+++ b/chrome/browser/web_applications/web_app_data_retriever.h
@@ -21,7 +21,7 @@
#include "third_party/blink/public/mojom/manifest/manifest.mojom-forward.h"

class GURL;
-struct WebApplicationInfo;
+struct WebAppInstallInfo;

namespace content {
class WebContents;
@@ -39,9 +39,9 @@
// install an app. Should only be called from the UI thread.
class WebAppDataRetriever : content::WebContentsObserver {
public:
- // Returns nullptr for WebApplicationInfo if error.
- using GetWebApplicationInfoCallback =
- base::OnceCallback<void(std::unique_ptr<WebApplicationInfo>)>;
+ // Returns nullptr for WebAppInstallInfo if error.
+ using GetWebAppInstallInfoCallback =
+ base::OnceCallback<void(std::unique_ptr<WebAppInstallInfo>)>;
// |is_installable| represents installability check result.
// If |is_installable| then |valid_manifest_for_web_app| is true.
// If manifest is present then it is non-empty.
@@ -59,10 +59,10 @@
WebAppDataRetriever& operator=(const WebAppDataRetriever&) = delete;
~WebAppDataRetriever() override;

- // Runs |callback| with the result of retrieving the WebApplicationInfo from
+ // Runs |callback| with the result of retrieving the WebAppInstallInfo from
// |web_contents|.
- virtual void GetWebApplicationInfo(content::WebContents* web_contents,
- GetWebApplicationInfoCallback callback);
+ virtual void GetWebAppInstallInfo(content::WebContents* web_contents,
+ GetWebAppInstallInfoCallback callback);

// Performs installability check and invokes |callback| with manifest.
virtual void CheckInstallabilityAndRetrieveManifest(
@@ -96,8 +96,8 @@
void CallCallbackOnError();
bool ShouldStopRetrieval() const;

- std::unique_ptr<WebApplicationInfo> preinstalled_web_application_info_;
- GetWebApplicationInfoCallback get_web_app_info_callback_;
+ std::unique_ptr<WebAppInstallInfo> preinstalled_web_application_info_;
+ GetWebAppInstallInfoCallback get_web_app_info_callback_;

CheckInstallabilityCallback check_installability_callback_;
GetIconsCallback get_icons_callback_;
diff --git a/chrome/browser/web_applications/web_app_data_retriever_unittest.cc b/chrome/browser/web_applications/web_app_data_retriever_unittest.cc
index ea3a254c..e4c62f1 100644
--- a/chrome/browser/web_applications/web_app_data_retriever_unittest.cc
+++ b/chrome/browser/web_applications/web_app_data_retriever_unittest.cc
@@ -57,8 +57,8 @@
std::move(handle)));
}

- // Set |web_app_info| to respond on |GetWebApplicationInfo|.
- void SetWebApplicationInfo(const WebApplicationInfo& web_app_info) {
+ // Set |web_app_info| to respond on |GetWebAppInstallInfo|.
+ void SetWebAppInstallInfo(const WebAppInstallInfo& web_app_info) {
web_app_info_ = web_app_info;
}

@@ -72,13 +72,13 @@
// Convert more fields as needed.
DCHECK(web_app_info_.manifest_icons.empty());
DCHECK(web_app_info_.mobile_capable ==
- WebApplicationInfo::MOBILE_CAPABLE_UNSPECIFIED);
+ WebAppInstallInfo::MOBILE_CAPABLE_UNSPECIFIED);

std::move(callback).Run(std::move(web_page_metadata));
}

private:
- WebApplicationInfo web_app_info_;
+ WebAppInstallInfo web_app_info_;

mojo::AssociatedReceiver<webapps::mojom::WebPageMetadataAgent> receiver_{
this};
@@ -113,13 +113,13 @@
web_contents()->GetMainFrame());
}

- void SetRendererWebApplicationInfo(const WebApplicationInfo& web_app_info) {
- fake_chrome_render_frame_.SetWebApplicationInfo(web_app_info);
+ void SetRendererWebAppInstallInfo(const WebAppInstallInfo& web_app_info) {
+ fake_chrome_render_frame_.SetWebAppInstallInfo(web_app_info);
}

- void GetWebApplicationInfoCallback(
+ void GetWebAppInstallInfoCallback(
base::OnceClosure quit_closure,
- std::unique_ptr<WebApplicationInfo> web_app_info) {
+ std::unique_ptr<WebAppInstallInfo> web_app_info) {
web_app_info_ = std::move(web_app_info);
std::move(quit_closure).Run();
}
@@ -135,7 +135,7 @@
return content::WebContentsTester::For(web_contents());
}

- const std::unique_ptr<WebApplicationInfo>& web_app_info() {
+ const std::unique_ptr<WebAppInstallInfo>& web_app_info() {
return web_app_info_.value();
}

@@ -143,147 +143,147 @@

private:
FakeWebPageMetadataAgent fake_chrome_render_frame_;
- absl::optional<std::unique_ptr<WebApplicationInfo>> web_app_info_;
+ absl::optional<std::unique_ptr<WebAppInstallInfo>> web_app_info_;
std::vector<apps::IconInfo> icons_;
};

-TEST_F(WebAppDataRetrieverTest, GetWebApplicationInfo_NoEntry) {
+TEST_F(WebAppDataRetrieverTest, GetWebAppInstallInfo_NoEntry) {
SetFakeWebPageMetadataAgent();

base::RunLoop run_loop;
WebAppDataRetriever retriever;
- retriever.GetWebApplicationInfo(
+ retriever.GetWebAppInstallInfo(
web_contents(),
- base::BindOnce(&WebAppDataRetrieverTest::GetWebApplicationInfoCallback,
+ base::BindOnce(&WebAppDataRetrieverTest::GetWebAppInstallInfoCallback,
base::Unretained(this), run_loop.QuitClosure()));
run_loop.Run();

EXPECT_EQ(nullptr, web_app_info());
}

-TEST_F(WebAppDataRetrieverTest, GetWebApplicationInfo_AppUrlAbsent) {
+TEST_F(WebAppDataRetrieverTest, GetWebAppInstallInfo_AppUrlAbsent) {
SetFakeWebPageMetadataAgent();

const GURL kFooUrl("https://foo.example");
web_contents_tester()->NavigateAndCommit(kFooUrl);

- WebApplicationInfo original_web_app_info;
+ WebAppInstallInfo original_web_app_info;
original_web_app_info.start_url = GURL();

- SetRendererWebApplicationInfo(original_web_app_info);
+ SetRendererWebAppInstallInfo(original_web_app_info);

base::RunLoop run_loop;
WebAppDataRetriever retriever;
- retriever.GetWebApplicationInfo(
+ retriever.GetWebAppInstallInfo(
web_contents(),
- base::BindOnce(&WebAppDataRetrieverTest::GetWebApplicationInfoCallback,
+ base::BindOnce(&WebAppDataRetrieverTest::GetWebAppInstallInfoCallback,
base::Unretained(this), run_loop.QuitClosure()));
run_loop.Run();

- // If the WebApplicationInfo has no URL, we fallback to the last committed
+ // If the WebAppInstallInfo has no URL, we fallback to the last committed
// URL.
EXPECT_EQ(kFooUrl, web_app_info()->start_url);
}

-TEST_F(WebAppDataRetrieverTest, GetWebApplicationInfo_AppUrlPresent) {
+TEST_F(WebAppDataRetrieverTest, GetWebAppInstallInfo_AppUrlPresent) {
SetFakeWebPageMetadataAgent();

web_contents_tester()->NavigateAndCommit(GURL("https://foo.example"));

- WebApplicationInfo original_web_app_info;
+ WebAppInstallInfo original_web_app_info;
original_web_app_info.start_url = GURL("https://bar.example");

- SetRendererWebApplicationInfo(original_web_app_info);
+ SetRendererWebAppInstallInfo(original_web_app_info);

base::RunLoop run_loop;
WebAppDataRetriever retriever;
- retriever.GetWebApplicationInfo(
+ retriever.GetWebAppInstallInfo(
web_contents(),
- base::BindOnce(&WebAppDataRetrieverTest::GetWebApplicationInfoCallback,
+ base::BindOnce(&WebAppDataRetrieverTest::GetWebAppInstallInfoCallback,
base::Unretained(this), run_loop.QuitClosure()));
run_loop.Run();

EXPECT_EQ(original_web_app_info.start_url, web_app_info()->start_url);
}

-TEST_F(WebAppDataRetrieverTest, GetWebApplicationInfo_TitleAbsentFromRenderer) {
+TEST_F(WebAppDataRetrieverTest, GetWebAppInstallInfo_TitleAbsentFromRenderer) {
SetFakeWebPageMetadataAgent();

web_contents_tester()->NavigateAndCommit(GURL("https://foo.example"));

web_contents_tester()->SetTitle(kFooTitle);

- WebApplicationInfo original_web_app_info;
+ WebAppInstallInfo original_web_app_info;
original_web_app_info.title = u"";

- SetRendererWebApplicationInfo(original_web_app_info);
+ SetRendererWebAppInstallInfo(original_web_app_info);

base::RunLoop run_loop;
WebAppDataRetriever retriever;
- retriever.GetWebApplicationInfo(
+ retriever.GetWebAppInstallInfo(
web_contents(),
- base::BindOnce(&WebAppDataRetrieverTest::GetWebApplicationInfoCallback,
+ base::BindOnce(&WebAppDataRetrieverTest::GetWebAppInstallInfoCallback,
base::Unretained(this), run_loop.QuitClosure()));
run_loop.Run();

- // If the WebApplicationInfo has no title, we fallback to the WebContents
+ // If the WebAppInstallInfo has no title, we fallback to the WebContents
// title.
EXPECT_EQ(kFooTitle, web_app_info()->title);
}

TEST_F(WebAppDataRetrieverTest,
- GetWebApplicationInfo_TitleAbsentFromWebContents) {
+ GetWebAppInstallInfo_TitleAbsentFromWebContents) {
SetFakeWebPageMetadataAgent();

web_contents_tester()->NavigateAndCommit(GURL("https://foo.example"));

web_contents_tester()->SetTitle(u"");

- WebApplicationInfo original_web_app_info;
+ WebAppInstallInfo original_web_app_info;
original_web_app_info.title = u"";

- SetRendererWebApplicationInfo(original_web_app_info);
+ SetRendererWebAppInstallInfo(original_web_app_info);

base::RunLoop run_loop;
WebAppDataRetriever retriever;
- retriever.GetWebApplicationInfo(
+ retriever.GetWebAppInstallInfo(
web_contents(),
- base::BindOnce(&WebAppDataRetrieverTest::GetWebApplicationInfoCallback,
+ base::BindOnce(&WebAppDataRetrieverTest::GetWebAppInstallInfoCallback,
base::Unretained(this), run_loop.QuitClosure()));
run_loop.Run();

- // If the WebApplicationInfo has no title and the WebContents has no title, we
+ // If the WebAppInstallInfo has no title and the WebContents has no title, we
// fallback to start_url.
EXPECT_EQ(base::UTF8ToUTF16(web_app_info()->start_url.spec()),
web_app_info()->title);
}

-TEST_F(WebAppDataRetrieverTest, GetWebApplicationInfo_ConnectionError) {
+TEST_F(WebAppDataRetrieverTest, GetWebAppInstallInfo_ConnectionError) {
// Do not set fake WebPageMetadataAgent to simulate connection error.

web_contents_tester()->NavigateAndCommit(GURL("https://foo.example"));

base::RunLoop run_loop;
WebAppDataRetriever retriever;
- retriever.GetWebApplicationInfo(
+ retriever.GetWebAppInstallInfo(
web_contents(),
- base::BindOnce(&WebAppDataRetrieverTest::GetWebApplicationInfoCallback,
+ base::BindOnce(&WebAppDataRetrieverTest::GetWebAppInstallInfoCallback,
base::Unretained(this), run_loop.QuitClosure()));
run_loop.Run();

EXPECT_EQ(nullptr, web_app_info());
}

-TEST_F(WebAppDataRetrieverTest, GetWebApplicationInfo_WebContentsDestroyed) {
+TEST_F(WebAppDataRetrieverTest, GetWebAppInstallInfo_WebContentsDestroyed) {
SetFakeWebPageMetadataAgent();

web_contents_tester()->NavigateAndCommit(GURL("https://foo.example"));

base::RunLoop run_loop;
WebAppDataRetriever retriever;
- retriever.GetWebApplicationInfo(
+ retriever.GetWebAppInstallInfo(
web_contents(),
- base::BindOnce(&WebAppDataRetrieverTest::GetWebApplicationInfoCallback,
+ base::BindOnce(&WebAppDataRetrieverTest::GetWebAppInstallInfoCallback,
base::Unretained(this), run_loop.QuitClosure()));
DeleteContents();
run_loop.Run();
@@ -341,7 +341,7 @@
run_loop.Run();
}

-TEST_F(WebAppDataRetrieverTest, GetWebApplicationInfo_FrameNavigated) {
+TEST_F(WebAppDataRetrieverTest, GetWebAppInstallInfo_FrameNavigated) {
SetFakeWebPageMetadataAgent();

web_contents_tester()->SetTitle(kFooTitle);
@@ -351,9 +351,9 @@

base::RunLoop run_loop;
WebAppDataRetriever retriever;
- retriever.GetWebApplicationInfo(
+ retriever.GetWebAppInstallInfo(
web_contents(),
- base::BindOnce(&WebAppDataRetrieverTest::GetWebApplicationInfoCallback,
+ base::BindOnce(&WebAppDataRetrieverTest::GetWebAppInstallInfoCallback,
base::Unretained(this), run_loop.QuitClosure()));
web_contents_tester()->NavigateAndCommit(kFooUrl);
run_loop.Run();
diff --git a/chrome/browser/web_applications/web_app_icon_manager_browsertest.cc b/chrome/browser/web_applications/web_app_icon_manager_browsertest.cc
index e26b114..b943ef4 100644
--- a/chrome/browser/web_applications/web_app_icon_manager_browsertest.cc
+++ b/chrome/browser/web_applications/web_app_icon_manager_browsertest.cc
@@ -73,8 +73,8 @@

AppId app_id;
{
- std::unique_ptr<WebApplicationInfo> web_application_info =
- std::make_unique<WebApplicationInfo>();
+ std::unique_ptr<WebAppInstallInfo> web_application_info =
+ std::make_unique<WebAppInstallInfo>();
web_application_info->start_url = start_url;
web_application_info->scope = start_url.GetWithoutFilename();
web_application_info->title = u"App Name";
diff --git a/chrome/browser/web_applications/web_app_install_finalizer.cc b/chrome/browser/web_applications/web_app_install_finalizer.cc
index 8bf45e4..739b6f9 100644
--- a/chrome/browser/web_applications/web_app_install_finalizer.cc
+++ b/chrome/browser/web_applications/web_app_install_finalizer.cc
@@ -126,7 +126,7 @@
WebAppInstallFinalizer::~WebAppInstallFinalizer() = default;

void WebAppInstallFinalizer::FinalizeInstall(
- const WebApplicationInfo& web_app_info,
+ const WebAppInstallInfo& web_app_info,
const FinalizeOptions& options,
InstallFinalizedCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -404,7 +404,7 @@
}

void WebAppInstallFinalizer::FinalizeUpdate(
- const WebApplicationInfo& web_app_info,
+ const WebAppInstallInfo& web_app_info,
InstallFinalizedCallback callback) {
CHECK(started_);

@@ -541,7 +541,7 @@
}

void WebAppInstallFinalizer::SetWebAppManifestFieldsAndWriteData(
- const WebApplicationInfo& web_app_info,
+ const WebAppInstallInfo& web_app_info,
std::unique_ptr<WebApp> web_app,
CommitCallback commit_callback) {
SetWebAppManifestFields(web_app_info, *web_app);
@@ -614,7 +614,7 @@
std::string old_name,
bool should_update_os_hooks,
FileHandlerUpdateAction file_handlers_need_os_update,
- const WebApplicationInfo& web_app_info,
+ const WebAppInstallInfo& web_app_info,
bool success) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (!success) {
@@ -653,7 +653,7 @@

FileHandlerUpdateAction WebAppInstallFinalizer::GetFileHandlerUpdateAction(
const AppId& app_id,
- const WebApplicationInfo& new_web_app_info) {
+ const WebAppInstallInfo& new_web_app_info) {
if (!os_integration_manager_->IsFileHandlingAPIAvailable(app_id))
return FileHandlerUpdateAction::kNoUpdate;

diff --git a/chrome/browser/web_applications/web_app_install_finalizer.h b/chrome/browser/web_applications/web_app_install_finalizer.h
index a6fbbaf..9b4580b 100644
--- a/chrome/browser/web_applications/web_app_install_finalizer.h
+++ b/chrome/browser/web_applications/web_app_install_finalizer.h
@@ -39,7 +39,7 @@
enum class WebAppUninstallJobResult;

// An finalizer for the installation process, represents the last step.
-// Takes WebApplicationInfo as input, writes data to disk (e.g icons, shortcuts)
+// Takes WebAppInstallInfo as input, writes data to disk (e.g icons, shortcuts)
// and registers an app.
class WebAppInstallFinalizer {
public:
@@ -74,7 +74,7 @@
// All methods below are |virtual| for testing.

// Write the WebApp data to disk and register the app.
- virtual void FinalizeInstall(const WebApplicationInfo& web_app_info,
+ virtual void FinalizeInstall(const WebAppInstallInfo& web_app_info,
const FinalizeOptions& options,
InstallFinalizedCallback callback);

@@ -82,7 +82,7 @@
// TODO(https://crbug.com/1196051): Chrome fails to update the manifest
// if the app window needing update closes at the same time as Chrome.
// Therefore, the manifest may not always update as expected.
- virtual void FinalizeUpdate(const WebApplicationInfo& web_app_info,
+ virtual void FinalizeUpdate(const WebAppInstallInfo& web_app_info,
InstallFinalizedCallback callback);

// Removes |webapp_uninstall_source| from |app_id|. If no more interested
@@ -170,7 +170,7 @@
OsHooksErrors os_hooks_errors);

void SetWebAppManifestFieldsAndWriteData(
- const WebApplicationInfo& web_app_info,
+ const WebAppInstallInfo& web_app_info,
std::unique_ptr<WebApp> web_app,
CommitCallback commit_callback);

@@ -191,7 +191,7 @@
std::string old_name,
bool should_update_os_hooks,
FileHandlerUpdateAction file_handlers_need_os_update,
- const WebApplicationInfo& web_app_info,
+ const WebAppInstallInfo& web_app_info,
bool success);

void OnUpdateHooksFinished(InstallFinalizedCallback callback,
@@ -205,7 +205,7 @@
// optimizations?
FileHandlerUpdateAction GetFileHandlerUpdateAction(
const AppId& app_id,
- const WebApplicationInfo& new_web_app_info);
+ const WebAppInstallInfo& new_web_app_info);

raw_ptr<WebAppRegistrar> registrar_ = nullptr;
raw_ptr<WebAppSyncBridge> sync_bridge_ = nullptr;
diff --git a/chrome/browser/web_applications/web_app_install_finalizer_unittest.cc b/chrome/browser/web_applications/web_app_install_finalizer_unittest.cc
index 64dab5c..4c76e3f2 100644
--- a/chrome/browser/web_applications/web_app_install_finalizer_unittest.cc
+++ b/chrome/browser/web_applications/web_app_install_finalizer_unittest.cc
@@ -78,7 +78,7 @@

// Synchronous version of FinalizeInstall.
FinalizeInstallResult AwaitFinalizeInstall(
- WebApplicationInfo info,
+ WebAppInstallInfo info,
WebAppInstallFinalizer::FinalizeOptions options) {
FinalizeInstallResult result{};
base::RunLoop run_loop;
@@ -108,7 +108,7 @@
};

TEST_F(WebAppInstallFinalizerUnitTest, BasicInstallSucceeds) {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = GURL("https://foo.example");
info->title = u"Foo Title";
WebAppInstallFinalizer::FinalizeOptions options;
@@ -122,11 +122,11 @@
}

TEST_F(WebAppInstallFinalizerUnitTest, ConcurrentInstallSucceeds) {
- auto info1 = std::make_unique<WebApplicationInfo>();
+ auto info1 = std::make_unique<WebAppInstallInfo>();
info1->start_url = GURL("https://foo1.example");
info1->title = u"Foo1 Title";

- auto info2 = std::make_unique<WebApplicationInfo>();
+ auto info2 = std::make_unique<WebAppInstallInfo>();
info2->start_url = GURL("https://foo2.example");
info2->title = u"Foo2 Title";

@@ -176,7 +176,7 @@
}

TEST_F(WebAppInstallFinalizerUnitTest, InstallStoresLatestWebAppInstallSource) {
- auto info = std::make_unique<WebApplicationInfo>();
+ auto info = std::make_unique<WebAppInstallInfo>();
info->start_url = GURL("https://foo.example");
info->title = u"Foo Title";
WebAppInstallFinalizer::FinalizeOptions options;
diff --git a/chrome/browser/web_applications/web_app_install_manager.cc b/chrome/browser/web_applications/web_app_install_manager.cc
index 85a7411..3eef2bdb 100644
--- a/chrome/browser/web_applications/web_app_install_manager.cc
+++ b/chrome/browser/web_applications/web_app_install_manager.cc
@@ -197,7 +197,7 @@
}

void WebAppInstallManager::InstallWebAppFromInfo(
- std::unique_ptr<WebApplicationInfo> web_application_info,
+ std::unique_ptr<WebAppInstallInfo> web_application_info,
bool overwrite_existing_manifest_fields,
ForInstallableSite for_installable_site,
webapps::WebappInstallSource install_source,
@@ -208,7 +208,7 @@
}

void WebAppInstallManager::InstallWebAppFromInfo(
- std::unique_ptr<WebApplicationInfo> web_application_info,
+ std::unique_ptr<WebAppInstallInfo> web_application_info,
bool overwrite_existing_manifest_fields,
ForInstallableSite for_installable_site,
const absl::optional<WebAppInstallParams>& install_params,
@@ -257,7 +257,7 @@

void WebAppInstallManager::EnqueueInstallAppFromSync(
const AppId& sync_app_id,
- std::unique_ptr<WebApplicationInfo> web_application_info,
+ std::unique_ptr<WebAppInstallInfo> web_application_info,
OnceInstallCallback callback) {
DCHECK(started_);
#if defined(OS_CHROMEOS)
@@ -351,7 +351,7 @@
for (WebApp* web_app : web_apps) {
DCHECK(web_app->is_from_sync_and_pending_installation());

- auto web_application_info = std::make_unique<WebApplicationInfo>();
+ auto web_application_info = std::make_unique<WebAppInstallInfo>();
web_application_info->manifest_id = web_app->manifest_id();
web_application_info->start_url = web_app->start_url();
web_application_info->title =
@@ -399,7 +399,7 @@
void WebAppInstallManager::
LoadAndInstallWebAppFromManifestWithFallbackCompleted_ForAppSync(
const AppId& sync_app_id,
- std::unique_ptr<WebApplicationInfo> web_application_info,
+ std::unique_ptr<WebAppInstallInfo> web_application_info,
OnceInstallCallback callback,
const AppId& web_app_id,
InstallResultCode code) {
diff --git a/chrome/browser/web_applications/web_app_install_manager.h b/chrome/browser/web_applications/web_app_install_manager.h
index 5d3e100..637369c 100644
--- a/chrome/browser/web_applications/web_app_install_manager.h
+++ b/chrome/browser/web_applications/web_app_install_manager.h
@@ -104,14 +104,14 @@
// If `web_application_info` contains data freshly fetched from the web app's
// site then `overwrite_existing_manifest_fields` should be true.
void InstallWebAppFromInfo(
- std::unique_ptr<WebApplicationInfo> web_application_info,
+ std::unique_ptr<WebAppInstallInfo> web_application_info,
bool overwrite_existing_manifest_fields,
ForInstallableSite for_installable_site,
webapps::WebappInstallSource install_source,
OnceInstallCallback callback);

void InstallWebAppFromInfo(
- std::unique_ptr<WebApplicationInfo> web_application_info,
+ std::unique_ptr<WebAppInstallInfo> web_application_info,
bool overwrite_existing_manifest_fields,
ForInstallableSite for_installable_site,
const absl::optional<WebAppInstallParams>& install_params,
@@ -157,14 +157,14 @@

void EnqueueInstallAppFromSync(
const AppId& sync_app_id,
- std::unique_ptr<WebApplicationInfo> web_application_info,
+ std::unique_ptr<WebAppInstallInfo> web_application_info,
OnceInstallCallback callback);
bool IsAppIdAlreadyEnqueued(const AppId& app_id) const;

// On failure will attempt a fallback install only loading icon URLs.
void LoadAndInstallWebAppFromManifestWithFallbackCompleted_ForAppSync(
const AppId& sync_app_id,
- std::unique_ptr<WebApplicationInfo> web_application_info,
+ std::unique_ptr<WebAppInstallInfo> web_application_info,
OnceInstallCallback callback,
const AppId& web_app_id,
InstallResultCode code);
diff --git a/chrome/browser/web_applications/web_app_install_manager_unittest.cc b/chrome/browser/web_applications/web_app_install_manager_unittest.cc
index 3312baf..5fee589f 100644
--- a/chrome/browser/web_applications/web_app_install_manager_unittest.cc
+++ b/chrome/browser/web_applications/web_app_install_manager_unittest.cc
@@ -63,9 +63,9 @@
constexpr SquareSizePx kDefaultImageSize = 100;
constexpr char kIconUrl[] = "https://example.com/app.ico";

-std::unique_ptr<WebApplicationInfo> ConvertWebAppToRendererWebApplicationInfo(
+std::unique_ptr<WebAppInstallInfo> ConvertWebAppToRendererWebAppInstallInfo(
const WebApp& app) {
- auto web_application_info = std::make_unique<WebApplicationInfo>();
+ auto web_application_info = std::make_unique<WebAppInstallInfo>();
// Most fields are expected to be populated by a manifest data in a subsequent
// override install process data flow. TODO(loyso): Make it more robust.
web_application_info->description = base::UTF8ToUTF16(app.description());
@@ -120,8 +120,8 @@
const WebApp& app) {
auto data_retriever = std::make_unique<FakeDataRetriever>();

- data_retriever->SetRendererWebApplicationInfo(
- ConvertWebAppToRendererWebApplicationInfo(app));
+ data_retriever->SetRendererWebAppInstallInfo(
+ ConvertWebAppToRendererWebAppInstallInfo(app));
data_retriever->SetManifest(ConvertWebAppToManifest(app),
/*is_installable=*/true);
data_retriever->SetIcons(ConvertWebAppIconsToIconsMap(app));
@@ -339,7 +339,7 @@
}

InstallResult InstallWebAppFromInfo(
- std::unique_ptr<WebApplicationInfo> web_application_info,
+ std::unique_ptr<WebAppInstallInfo> web_application_info,
bool overwrite_existing_manifest_fields,
webapps::WebappInstallSource install_source) {
InstallResult result;
@@ -976,7 +976,7 @@
const AppId expected_app_id =
GenerateAppId(/*manifest_id=*/absl::nullopt, url);

- auto server_web_app_info = std::make_unique<WebApplicationInfo>();
+ auto server_web_app_info = std::make_unique<WebAppInstallInfo>();
server_web_app_info->start_url = url;
server_web_app_info->scope = url;
server_web_app_info->title = u"Test web app";
@@ -1088,7 +1088,7 @@
const AppId app_id = GenerateAppId(/*manifest_id=*/absl::nullopt, start_url);

// Reproduces `ApkWebAppInstaller` install parameters.
- auto apk_web_application_info = std::make_unique<WebApplicationInfo>();
+ auto apk_web_application_info = std::make_unique<WebAppInstallInfo>();
apk_web_application_info->start_url = start_url;
apk_web_application_info->scope = GURL("https://example.com/apk_scope");
apk_web_application_info->title = u"Name from APK";
diff --git a/chrome/browser/web_applications/web_app_install_params.h b/chrome/browser/web_applications/web_app_install_params.h
index 62af0d9..be356982 100644
--- a/chrome/browser/web_applications/web_app_install_params.h
+++ b/chrome/browser/web_applications/web_app_install_params.h
@@ -17,7 +17,7 @@
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "url/gurl.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

namespace content {
class WebContents;
@@ -35,13 +35,13 @@
// web app.
using WebAppInstallationAcceptanceCallback =
base::OnceCallback<void(bool user_accepted,
- std::unique_ptr<WebApplicationInfo>)>;
+ std::unique_ptr<WebAppInstallInfo>)>;

// Callback to show the WebApp installation confirmation bubble in UI.
-// |web_app_info| is the WebApplicationInfo to be installed.
+// |web_app_info| is the WebAppInstallInfo to be installed.
using WebAppInstallDialogCallback = base::OnceCallback<void(
content::WebContents* initiator_web_contents,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
ForInstallableSite for_installable_site,
WebAppInstallationAcceptanceCallback acceptance_callback)>;

diff --git a/chrome/browser/web_applications/web_app_install_task.cc b/chrome/browser/web_applications/web_app_install_task.cc
index 48cd3ba2..e9350e8 100644
--- a/chrome/browser/web_applications/web_app_install_task.cc
+++ b/chrome/browser/web_applications/web_app_install_task.cc
@@ -173,10 +173,10 @@
install_callback_ = std::move(install_callback);
install_source_ = install_source;

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();

if (install_params_)
- ApplyParamsToWebApplicationInfo(*install_params_, *web_app_info);
+ ApplyParamsToWebAppInstallInfo(*install_params_, *web_app_info);

data_retriever_->CheckInstallabilityAndRetrieveManifest(
web_contents(), bypass_service_worker_check,
@@ -200,10 +200,9 @@
install_callback_ = std::move(install_callback);
install_source_ = install_source;

- data_retriever_->GetWebApplicationInfo(
- web_contents(),
- base::BindOnce(&WebAppInstallTask::OnGetWebApplicationInfo, GetWeakPtr(),
- force_shortcut_app));
+ data_retriever_->GetWebAppInstallInfo(
+ web_contents(), base::BindOnce(&WebAppInstallTask::OnGetWebAppInstallInfo,
+ GetWeakPtr(), force_shortcut_app));
}

void WebAppInstallTask::LoadAndInstallWebAppFromManifestWithFallback(
@@ -227,7 +226,7 @@
url_loader->LoadUrl(
launch_url, contents,
WebAppUrlLoader::UrlComparison::kIgnoreQueryParamsAndRef,
- base::BindOnce(&WebAppInstallTask::OnWebAppUrlLoadedGetWebApplicationInfo,
+ base::BindOnce(&WebAppInstallTask::OnWebAppUrlLoadedGetWebAppInstallInfo,
GetWeakPtr(), launch_url));
}

@@ -251,7 +250,7 @@
url_loader->LoadUrl(
install_url, contents,
WebAppUrlLoader::UrlComparison::kIgnoreQueryParamsAndRef,
- base::BindOnce(&WebAppInstallTask::OnWebAppUrlLoadedGetWebApplicationInfo,
+ base::BindOnce(&WebAppInstallTask::OnWebAppUrlLoadedGetWebAppInstallInfo,
GetWeakPtr(), install_url));
}

@@ -279,7 +278,7 @@
}

void WebAppInstallTask::InstallWebAppFromInfo(
- std::unique_ptr<WebApplicationInfo> web_application_info,
+ std::unique_ptr<WebAppInstallInfo> web_application_info,
bool overwrite_existing_manifest_fields,
ForInstallableSite for_installable_site,
webapps::WebappInstallSource install_source,
@@ -291,7 +290,7 @@
// No IconsMap to populate shortcut item icons from.

if (install_params_)
- ApplyParamsToWebApplicationInfo(*install_params_, *web_application_info);
+ ApplyParamsToWebAppInstallInfo(*install_params_, *web_application_info);

install_source_ = install_source;
background_installation_ = true;
@@ -324,16 +323,16 @@
install_source_ = install_source;
background_installation_ = true;

- data_retriever_->GetWebApplicationInfo(
+ data_retriever_->GetWebAppInstallInfo(
web_contents(),
- base::BindOnce(&WebAppInstallTask::OnGetWebApplicationInfo, GetWeakPtr(),
+ base::BindOnce(&WebAppInstallTask::OnGetWebAppInstallInfo, GetWeakPtr(),
/*force_shortcut_app=*/false));
}

-void WebAppInstallTask::LoadAndRetrieveWebApplicationInfoWithIcons(
+void WebAppInstallTask::LoadAndRetrieveWebAppInstallInfoWithIcons(
const GURL& start_url,
WebAppUrlLoader* url_loader,
- RetrieveWebApplicationInfoWithIconsCallback callback) {
+ RetrieveWebAppInstallInfoWithIconsCallback callback) {
CheckInstallPreconditions();

retrieve_info_callback_ = std::move(callback);
@@ -347,7 +346,7 @@
url_loader->LoadUrl(
start_url, web_contents(),
WebAppUrlLoader::UrlComparison::kIgnoreQueryParamsAndRef,
- base::BindOnce(&WebAppInstallTask::OnWebAppUrlLoadedGetWebApplicationInfo,
+ base::BindOnce(&WebAppInstallTask::OnWebAppUrlLoadedGetWebAppInstallInfo,
GetWeakPtr(), start_url));
}

@@ -430,7 +429,7 @@
return !web_contents() || web_contents()->IsBeingDestroyed();
}

-void WebAppInstallTask::OnWebAppUrlLoadedGetWebApplicationInfo(
+void WebAppInstallTask::OnWebAppUrlLoadedGetWebAppInstallInfo(
const GURL& url_to_load,
WebAppUrlLoader::Result result) {
if (ShouldStopInstall())
@@ -454,9 +453,9 @@
return;
}

- data_retriever_->GetWebApplicationInfo(
+ data_retriever_->GetWebAppInstallInfo(
web_contents(),
- base::BindOnce(&WebAppInstallTask::OnGetWebApplicationInfo, GetWeakPtr(),
+ base::BindOnce(&WebAppInstallTask::OnGetWebAppInstallInfo, GetWeakPtr(),
/*force_shortcut_app*/ false));
}

@@ -509,16 +508,16 @@
}
}

-void WebAppInstallTask::OnGetWebApplicationInfo(
+void WebAppInstallTask::OnGetWebAppInstallInfo(
bool force_shortcut_app,
- std::unique_ptr<WebApplicationInfo> web_app_info) {
+ std::unique_ptr<WebAppInstallInfo> web_app_info) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (ShouldStopInstall())
return;

if (!web_app_info) {
CallInstallCallback(AppId(),
- InstallResultCode::kGetWebApplicationInfoFailed);
+ InstallResultCode::kGetWebAppInstallInfoFailed);
return;
}

@@ -534,7 +533,7 @@
if (install_params_->fallback_app_name.has_value())
web_app_info->title = install_params_->fallback_app_name.value();

- ApplyParamsToWebApplicationInfo(*install_params_, *web_app_info);
+ ApplyParamsToWebAppInstallInfo(*install_params_, *web_app_info);
}

data_retriever_->CheckInstallabilityAndRetrieveManifest(
@@ -544,9 +543,9 @@
force_shortcut_app));
}

-void WebAppInstallTask::ApplyParamsToWebApplicationInfo(
+void WebAppInstallTask::ApplyParamsToWebAppInstallInfo(
const WebAppInstallParams& install_params,
- WebApplicationInfo& web_app_info) {
+ WebAppInstallInfo& web_app_info) {
if (install_params.user_display_mode != DisplayMode::kUndefined)
web_app_info.user_display_mode = install_params.user_display_mode;

@@ -567,7 +566,7 @@
}

void WebAppInstallTask::OnDidPerformInstallableCheck(
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
bool force_shortcut_app,
blink::mojom::ManifestPtr opt_manifest,
const GURL& manifest_url,
@@ -638,7 +637,7 @@

void WebAppInstallTask::CheckForPlayStoreIntentOrGetIcons(
blink::mojom::ManifestPtr opt_manifest,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
std::vector<GURL> icon_urls,
ForInstallableSite for_installable_site,
bool skip_page_favicons) {
@@ -697,7 +696,7 @@
}

void WebAppInstallTask::OnDidCheckForIntentToPlayStore(
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
std::vector<GURL> icon_urls,
ForInstallableSite for_installable_site,
bool skip_page_favicons,
@@ -728,7 +727,7 @@

void WebAppInstallTask::InstallWebAppFromInfoRetrieveIcons(
content::WebContents* web_contents,
- std::unique_ptr<WebApplicationInfo> web_application_info,
+ std::unique_ptr<WebAppInstallInfo> web_application_info,
WebAppInstallFinalizer::FinalizeOptions finalize_options,
OnceInstallCallback callback) {
CheckInstallPreconditions();
@@ -753,7 +752,7 @@
}

void WebAppInstallTask::OnIconsRetrieved(
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
WebAppInstallFinalizer::FinalizeOptions finalize_options,
IconsDownloadedResult result,
IconsMap icons_map,
@@ -778,7 +777,7 @@
}

void WebAppInstallTask::OnIconsRetrievedShowDialog(
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
ForInstallableSite for_installable_site,
IconsDownloadedResult result,
IconsMap icons_map,
@@ -811,7 +810,7 @@
void WebAppInstallTask::OnDialogCompleted(
ForInstallableSite for_installable_site,
bool user_accepted,
- std::unique_ptr<WebApplicationInfo> web_app_info) {
+ std::unique_ptr<WebAppInstallInfo> web_app_info) {
if (ShouldStopInstall())
return;

@@ -826,7 +825,7 @@
return;
}

- WebApplicationInfo web_app_info_copy = *web_app_info;
+ WebAppInstallInfo web_app_info_copy = *web_app_info;

// This metric is recorded regardless of the installation result.
RecordInstallEvent();
@@ -867,7 +866,7 @@
}

void WebAppInstallTask::OnInstallFinalizedCreateShortcuts(
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
const AppId& app_id,
InstallResultCode code) {
if (ShouldStopInstall())
@@ -1043,7 +1042,7 @@
}

void WebAppInstallTask::LogDownloadedIconsErrors(
- const WebApplicationInfo& web_app_info,
+ const WebAppInstallInfo& web_app_info,
IconsDownloadedResult icons_downloaded_result,
const IconsMap& icons_map,
const DownloadedIconsHttpResults& icons_http_results) {
diff --git a/chrome/browser/web_applications/web_app_install_task.h b/chrome/browser/web_applications/web_app_install_task.h
index 6b58969..b7dd9da3 100644
--- a/chrome/browser/web_applications/web_app_install_task.h
+++ b/chrome/browser/web_applications/web_app_install_task.h
@@ -27,7 +27,7 @@

class GURL;
class Profile;
-struct WebApplicationInfo;
+struct WebAppInstallInfo;

namespace content {
class WebContents;
@@ -46,8 +46,8 @@
// WebAppInstallTask is an implementation detail of WebAppInstallManager.
class WebAppInstallTask : content::WebContentsObserver {
public:
- using RetrieveWebApplicationInfoWithIconsCallback =
- base::OnceCallback<void(std::unique_ptr<WebApplicationInfo>)>;
+ using RetrieveWebAppInstallInfoWithIconsCallback =
+ base::OnceCallback<void(std::unique_ptr<WebAppInstallInfo>)>;

WebAppInstallTask(Profile* profile,
OsIntegrationManager* os_integration_manager,
@@ -119,7 +119,7 @@
// entire web app installation data.
void InstallWebAppFromInfoRetrieveIcons(
content::WebContents* web_contents,
- std::unique_ptr<WebApplicationInfo> web_application_info,
+ std::unique_ptr<WebAppInstallInfo> web_application_info,
WebAppInstallFinalizer::FinalizeOptions finalize_options,
OnceInstallCallback callback);

@@ -127,7 +127,7 @@
// |web_application_info| which holds all the data needed for installation.
// WebAppInstallManager doesn't fetch a manifest.
void InstallWebAppFromInfo(
- std::unique_ptr<WebApplicationInfo> web_application_info,
+ std::unique_ptr<WebAppInstallInfo> web_application_info,
bool overwrite_existing_manifest_fields,
ForInstallableSite for_installable_site,
webapps::WebappInstallSource install_source,
@@ -142,12 +142,12 @@
webapps::WebappInstallSource install_source,
OnceInstallCallback callback);

- // Obtains WebApplicationInfo about web app located at |start_url|, fallbacks
+ // Obtains WebAppInstallInfo about web app located at |start_url|, fallbacks
// to title/favicon if manifest is not present.
- void LoadAndRetrieveWebApplicationInfoWithIcons(
+ void LoadAndRetrieveWebAppInstallInfoWithIcons(
const GURL& start_url,
WebAppUrlLoader* url_loader,
- RetrieveWebApplicationInfoWithIconsCallback callback);
+ RetrieveWebAppInstallInfoWithIconsCallback callback);

static std::unique_ptr<content::WebContents> CreateWebContents(
Profile* profile);
@@ -184,8 +184,8 @@
// install_callback_.
bool ShouldStopInstall() const;

- void OnWebAppUrlLoadedGetWebApplicationInfo(const GURL& url_to_load,
- WebAppUrlLoader::Result result);
+ void OnWebAppUrlLoadedGetWebAppInstallInfo(const GURL& url_to_load,
+ WebAppUrlLoader::Result result);

void OnWebAppUrlLoadedCheckAndRetrieveManifest(
const GURL& url_to_load,
@@ -196,18 +196,16 @@
bool valid_manifest_for_web_app,
bool is_installable);

- void OnGetWebApplicationInfo(
- bool force_shortcut_app,
- std::unique_ptr<WebApplicationInfo> web_app_info);
+ void OnGetWebAppInstallInfo(bool force_shortcut_app,
+ std::unique_ptr<WebAppInstallInfo> web_app_info);

// Makes amendments to |web_app_info| based on the options set in
// |install_params|.
- void ApplyParamsToWebApplicationInfo(
- const WebAppInstallParams& install_params,
- WebApplicationInfo& web_app_info);
+ void ApplyParamsToWebAppInstallInfo(const WebAppInstallParams& install_params,
+ WebAppInstallInfo& web_app_info);

void OnDidPerformInstallableCheck(
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
bool force_shortcut_app,
blink::mojom::ManifestPtr opt_manifest,
const GURL& manifest_url,
@@ -220,7 +218,7 @@
// check if it cannot be made.
void CheckForPlayStoreIntentOrGetIcons(
blink::mojom::ManifestPtr opt_manifest,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
std::vector<GURL> icon_urls,
ForInstallableSite for_installable_site,
bool skip_page_favicons);
@@ -228,7 +226,7 @@
// Called when the asynchronous check for whether an intent to the Play Store
// should be made returns.
void OnDidCheckForIntentToPlayStore(
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
std::vector<GURL> icon_urls,
ForInstallableSite for_installable_site,
bool skip_page_favicons,
@@ -236,23 +234,23 @@
bool should_intent_to_store);

void OnIconsRetrieved(
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
WebAppInstallFinalizer::FinalizeOptions finalize_options,
IconsDownloadedResult result,
IconsMap icons_map,
DownloadedIconsHttpResults icons_http_results);
void OnIconsRetrievedShowDialog(
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
ForInstallableSite for_installable_site,
IconsDownloadedResult result,
IconsMap icons_map,
DownloadedIconsHttpResults icons_http_results);
void OnDialogCompleted(ForInstallableSite for_installable_site,
bool user_accepted,
- std::unique_ptr<WebApplicationInfo> web_app_info);
+ std::unique_ptr<WebAppInstallInfo> web_app_info);
void OnInstallFinalized(const AppId& app_id, InstallResultCode code);
void OnInstallFinalizedCreateShortcuts(
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
const AppId& app_id,
InstallResultCode code);
void OnOsHooksCreated(DisplayMode user_display_mode,
@@ -275,7 +273,7 @@
const std::string& url,
const AppId& app_id);
void LogDownloadedIconsErrors(
- const WebApplicationInfo& web_app_info,
+ const WebAppInstallInfo& web_app_info,
IconsDownloadedResult icons_downloaded_result,
const IconsMap& icons_map,
const DownloadedIconsHttpResults& icons_http_results);
@@ -284,13 +282,13 @@
// methods.
bool initiated_ = false;

- // Whether we should just obtain WebApplicationInfo instead of the actual
+ // Whether we should just obtain WebAppInstallInfo instead of the actual
// installation.
bool only_retrieve_web_application_info_ = false;

WebAppInstallDialogCallback dialog_callback_;
OnceInstallCallback install_callback_;
- RetrieveWebApplicationInfoWithIconsCallback retrieve_info_callback_;
+ RetrieveWebAppInstallInfoWithIconsCallback retrieve_info_callback_;
absl::optional<WebAppInstallParams> install_params_;
absl::optional<AppId> expected_app_id_;
bool background_installation_ = false;
@@ -302,7 +300,7 @@
webapps::WebappInstallSource install_source_ = kNoInstallSource;

std::unique_ptr<WebAppDataRetriever> data_retriever_;
- std::unique_ptr<WebApplicationInfo> web_application_info_;
+ std::unique_ptr<WebAppInstallInfo> web_application_info_;
std::unique_ptr<content::WebContents> web_contents_;
content::WebContents* installing_web_contents_ = nullptr;

diff --git a/chrome/browser/web_applications/web_app_install_task_unittest.cc b/chrome/browser/web_applications/web_app_install_task_unittest.cc
index 8ab09bc6..1c7a7c3 100644
--- a/chrome/browser/web_applications/web_app_install_task_unittest.cc
+++ b/chrome/browser/web_applications/web_app_install_task_unittest.cc
@@ -164,7 +164,7 @@
const GURL& scope,
absl::optional<SkColor> theme_color,
DisplayMode user_display_mode) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();

web_app_info->start_url = url;
web_app_info->title = base::UTF8ToUTF16(name);
@@ -173,7 +173,7 @@
web_app_info->theme_color = theme_color;
web_app_info->user_display_mode = user_display_mode;

- data_retriever_->SetRendererWebApplicationInfo(std::move(web_app_info));
+ data_retriever_->SetRendererWebAppInstallInfo(std::move(web_app_info));
}

void CreateRendererAppInfo(const GURL& url,
@@ -211,9 +211,9 @@
void CreateDataToRetrieve(const GURL& url, DisplayMode user_display_mode) {
DCHECK(data_retriever_);

- auto renderer_web_app_info = std::make_unique<WebApplicationInfo>();
+ auto renderer_web_app_info = std::make_unique<WebAppInstallInfo>();
renderer_web_app_info->user_display_mode = user_display_mode;
- data_retriever_->SetRendererWebApplicationInfo(
+ data_retriever_->SetRendererWebAppInstallInfo(
std::move(renderer_web_app_info));

auto manifest = blink::mojom::Manifest::New();
@@ -289,14 +289,14 @@
return result;
}

- std::unique_ptr<WebApplicationInfo>
- LoadAndRetrieveWebApplicationInfoWithIcons(const GURL& url) {
- std::unique_ptr<WebApplicationInfo> result;
+ std::unique_ptr<WebAppInstallInfo> LoadAndRetrieveWebAppInstallInfoWithIcons(
+ const GURL& url) {
+ std::unique_ptr<WebAppInstallInfo> result;
base::RunLoop run_loop;
- install_task_->LoadAndRetrieveWebApplicationInfoWithIcons(
+ install_task_->LoadAndRetrieveWebAppInstallInfoWithIcons(
url, &url_loader(),
base::BindLambdaForTesting(
- [&](std::unique_ptr<WebApplicationInfo> web_app_info) {
+ [&](std::unique_ptr<WebAppInstallInfo> web_app_info) {
result = std::move(web_app_info);
run_loop.Quit();
}));
@@ -398,7 +398,7 @@
absl::optional<SkColor> theme_color,
DisplayMode user_display_mode,
bool run_on_os_login) {
- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();

web_app_info->start_url = url;
web_app_info->title = base::UTF8ToUTF16(name);
@@ -408,7 +408,7 @@
web_app_info->user_display_mode = user_display_mode;
web_app_info->run_on_os_login = run_on_os_login;

- data_retriever_->SetRendererWebApplicationInfo(std::move(web_app_info));
+ data_retriever_->SetRendererWebAppInstallInfo(std::move(web_app_info));
}

private:
@@ -514,7 +514,7 @@
EXPECT_TRUE(callback_called);
}

-TEST_F(WebAppInstallTaskTest, GetWebApplicationInfoFailed) {
+TEST_F(WebAppInstallTaskTest, GetWebAppInstallInfoFailed) {
// data_retriever_ with empty info means an error.

base::RunLoop run_loop;
@@ -527,7 +527,7 @@
base::BindOnce(test::TestAcceptDialogCallback),
base::BindLambdaForTesting(
[&](const AppId& installed_app_id, InstallResultCode code) {
- EXPECT_EQ(InstallResultCode::kGetWebApplicationInfoFailed, code);
+ EXPECT_EQ(InstallResultCode::kGetWebAppInstallInfoFailed, code);
EXPECT_EQ(AppId(), installed_app_id);
callback_called = true;
run_loop.Quit();
@@ -676,7 +676,7 @@

InstallWebAppFromManifestWithFallback();

- std::unique_ptr<WebApplicationInfo> web_app_info =
+ std::unique_ptr<WebAppInstallInfo> web_app_info =
fake_install_finalizer().web_app_info();

// Make sure that icons have been generated for all sub sizes.
@@ -716,7 +716,7 @@

InstallWebAppFromManifestWithFallback();

- std::unique_ptr<WebApplicationInfo> web_app_info =
+ std::unique_ptr<WebAppInstallInfo> web_app_info =
fake_install_finalizer().web_app_info();

// Make sure that icons have been generated for all sizes.
@@ -758,7 +758,7 @@

InstallWebAppFromManifestWithFallback();

- std::unique_ptr<WebApplicationInfo> web_app_info =
+ std::unique_ptr<WebAppInstallInfo> web_app_info =
fake_install_finalizer().web_app_info();
EXPECT_TRUE(ContainsOneIconOfEachSize(web_app_info->icon_bitmaps.any));
EXPECT_TRUE(web_app_info->manifest_icons.empty());
@@ -829,7 +829,7 @@
}
}

- data_retriever().SetEmptyRendererWebApplicationInfo();
+ data_retriever().SetEmptyRendererWebAppInstallInfo();
data_retriever().SetManifest(std::move(manifest), /*is_installable=*/true);
data_retriever().SetIcons(std::move(icons_map));
}
@@ -1036,7 +1036,7 @@
const GURL url = GURL("https://example.com/path");
const AppId app_id = GenerateAppId(/*manifest_id=*/absl::nullopt, url);

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = url;
web_app_info->user_display_mode = DisplayMode::kStandalone;
web_app_info->title = u"App Name";
@@ -1051,7 +1051,7 @@
EXPECT_EQ(InstallResultCode::kSuccessNewInstall, code);
EXPECT_EQ(app_id, installed_app_id);

- std::unique_ptr<WebApplicationInfo> final_web_app_info =
+ std::unique_ptr<WebAppInstallInfo> final_web_app_info =
fake_install_finalizer().web_app_info();
EXPECT_EQ(final_web_app_info->user_display_mode,
DisplayMode::kStandalone);
@@ -1065,7 +1065,7 @@
TEST_F(WebAppInstallTaskTest, InstallWebAppFromInfo_GenerateIcons) {
SetInstallFinalizerForTesting();

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = GURL("https://example.com/path");
web_app_info->user_display_mode = DisplayMode::kBrowser;
web_app_info->title = u"App Name";
@@ -1081,7 +1081,7 @@
ForInstallableSite::kYes, webapps::WebappInstallSource::ARC,
base::BindLambdaForTesting([&](const AppId& installed_app_id,
InstallResultCode code) {
- std::unique_ptr<WebApplicationInfo> final_web_app_info =
+ std::unique_ptr<WebAppInstallInfo> final_web_app_info =
fake_install_finalizer().web_app_info();

// Make sure that icons have been generated for all sub sizes.
@@ -1119,7 +1119,7 @@
InstallResultCode code) {
EXPECT_EQ(InstallResultCode::kSuccessNewInstall, code);

- std::unique_ptr<WebApplicationInfo> final_web_app_info =
+ std::unique_ptr<WebAppInstallInfo> final_web_app_info =
fake_install_finalizer().web_app_info();
// Make sure that icons have been generated for all sub sizes.
EXPECT_TRUE(
@@ -1320,7 +1320,7 @@
}
}

-TEST_F(WebAppInstallTaskTest, LoadAndRetrieveWebApplicationInfoWithIcons) {
+TEST_F(WebAppInstallTaskTest, LoadAndRetrieveWebAppInstallInfoWithIcons) {
const GURL url = GURL("https://example.com/path");
const GURL start_url = GURL("https://example.com/start");
const std::string name = "Name";
@@ -1331,8 +1331,8 @@
url_loader().SetNextLoadUrlResult(
url, WebAppUrlLoader::Result::kRedirectedUrlLoaded);

- std::unique_ptr<WebApplicationInfo> result =
- LoadAndRetrieveWebApplicationInfoWithIcons(url);
+ std::unique_ptr<WebAppInstallInfo> result =
+ LoadAndRetrieveWebAppInstallInfoWithIcons(url);
EXPECT_FALSE(result);
}
ResetInstallTask();
@@ -1341,8 +1341,8 @@
url_loader().SetNextLoadUrlResult(
url, WebAppUrlLoader::Result::kFailedPageTookTooLong);

- std::unique_ptr<WebApplicationInfo> result =
- LoadAndRetrieveWebApplicationInfoWithIcons(url);
+ std::unique_ptr<WebAppInstallInfo> result =
+ LoadAndRetrieveWebAppInstallInfoWithIcons(url);
EXPECT_FALSE(result);
}
ResetInstallTask();
@@ -1351,8 +1351,8 @@
CreateRendererAppInfo(url, name, description);
url_loader().SetNextLoadUrlResult(url, WebAppUrlLoader::Result::kUrlLoaded);

- std::unique_ptr<WebApplicationInfo> result =
- LoadAndRetrieveWebApplicationInfoWithIcons(url);
+ std::unique_ptr<WebAppInstallInfo> result =
+ LoadAndRetrieveWebAppInstallInfoWithIcons(url);
EXPECT_TRUE(result);
EXPECT_EQ(result->start_url, start_url);
EXPECT_TRUE(result->manifest_icons.empty());
@@ -1370,11 +1370,11 @@
profile(), &fake_os_integration_manager(), install_finalizer_.get(),
std::move(data_retriever), &registrar());

- std::unique_ptr<WebApplicationInfo> info;
- task->LoadAndRetrieveWebApplicationInfoWithIcons(
+ std::unique_ptr<WebAppInstallInfo> info;
+ task->LoadAndRetrieveWebAppInstallInfoWithIcons(
url, &url_loader(),
base::BindLambdaForTesting(
- [&](std::unique_ptr<WebApplicationInfo> app_info) {
+ [&](std::unique_ptr<WebAppInstallInfo> app_info) {
info = std::move(app_info);
run_loop.Quit();
}));
@@ -1394,12 +1394,12 @@
manifest->start_url = GURL("https://example.com/start");
manifest->isolated_storage = true;

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
UpdateWebAppInfoFromManifest(*manifest, manifest_start_url,
web_app_info.get());

data_retriever_->SetManifest(std::move(manifest), /*is_installable=*/true);
- data_retriever_->SetRendererWebApplicationInfo(std::move(web_app_info));
+ data_retriever_->SetRendererWebAppInstallInfo(std::move(web_app_info));

base::RunLoop run_loop;
bool callback_called = false;
@@ -1572,7 +1572,7 @@
InstallResultCode code) {
result.app_id = installed_app_id;
result.code = code;
- std::unique_ptr<WebApplicationInfo> final_web_app_info =
+ std::unique_ptr<WebAppInstallInfo> final_web_app_info =
fake_install_finalizer().web_app_info();
EXPECT_EQ(theme_color, final_web_app_info->theme_color);
EXPECT_EQ(1u, final_web_app_info->shortcuts_menu_item_infos.size());
@@ -1619,7 +1619,7 @@
InstallResult result;
const AppId app_id = GenerateAppId(/*manifest_id=*/absl::nullopt, url);

- auto web_app_info = std::make_unique<WebApplicationInfo>();
+ auto web_app_info = std::make_unique<WebAppInstallInfo>();
web_app_info->start_url = url;
web_app_info->user_display_mode = DisplayMode::kStandalone;
web_app_info->theme_color = theme_color;
@@ -1648,7 +1648,7 @@
InstallResultCode code) {
result.app_id = installed_app_id;
result.code = code;
- std::unique_ptr<WebApplicationInfo> final_web_app_info =
+ std::unique_ptr<WebAppInstallInfo> final_web_app_info =
fake_install_finalizer().web_app_info();
EXPECT_EQ(theme_color, final_web_app_info->theme_color);
EXPECT_EQ(1u, final_web_app_info->shortcuts_menu_item_infos.size());
@@ -1799,9 +1799,8 @@
return manifest;
}

- std::unique_ptr<WebApplicationInfo> CreateWebApplicationInfo(
- const GURL& url) {
- auto app_info = std::make_unique<WebApplicationInfo>();
+ std::unique_ptr<WebAppInstallInfo> CreateWebAppInstallInfo(const GURL& url) {
+ auto app_info = std::make_unique<WebAppInstallInfo>();
app_info->title = u"Test App";
app_info->start_url = url;
app_info->scope = url;
@@ -1844,7 +1843,7 @@

InstallResult UpdateWebAppFromInfo(
const AppId& app_id,
- std::unique_ptr<WebApplicationInfo> app_info) {
+ std::unique_ptr<WebAppInstallInfo> app_info) {
base::RunLoop run_loop;
bool callback_called = false;
InstallResult result;
@@ -1918,7 +1917,7 @@
ResetInstallTask();

// Update the app, adding a file handler.
- auto app_info = CreateWebApplicationInfo(url);
+ auto app_info = CreateWebAppInstallInfo(url);
std::vector<blink::mojom::ManifestFileHandlerPtr> file_handlers;
AddFileHandler(&file_handlers);
app_info->file_handlers = CreateFileHandlersFromManifest(file_handlers, url);
@@ -1950,7 +1949,7 @@
ResetInstallTask();

// Update the app, adding a file handler.
- auto app_info = CreateWebApplicationInfo(url);
+ auto app_info = CreateWebAppInstallInfo(url);
std::vector<blink::mojom::ManifestFileHandlerPtr> file_handlers;
AddFileHandler(&file_handlers);
app_info->file_handlers = CreateFileHandlersFromManifest(file_handlers, url);
diff --git a/chrome/browser/web_applications/web_app_install_utils.cc b/chrome/browser/web_applications/web_app_install_utils.cc
index 5efd96b..0f57321e 100644
--- a/chrome/browser/web_applications/web_app_install_utils.cc
+++ b/chrome/browser/web_applications/web_app_install_utils.cc
@@ -240,7 +240,7 @@
return protocol_handlers;
}

-void PopulateShortcutItemIcons(WebApplicationInfo* web_app_info,
+void PopulateShortcutItemIcons(WebAppInstallInfo* web_app_info,
const IconsMap& icons_map) {
web_app_info->shortcuts_menu_icon_bitmaps.clear();
for (auto& shortcut : web_app_info->shortcuts_menu_item_infos) {
@@ -272,7 +272,7 @@
// Reconcile the file handling icons that were specified in the manifest with
// the icons we were successfully able to download. Store the actual bitmaps and
// update the icon metadata in `web_app_info`.
-void PopulateFileHandlingIcons(WebApplicationInfo* web_app_info,
+void PopulateFileHandlingIcons(WebAppInstallInfo* web_app_info,
const IconsMap& icons_map) {
IconsMap& other_icon_bitmaps = web_app_info->other_icon_bitmaps;
other_icon_bitmaps.clear();
@@ -362,7 +362,7 @@

void UpdateWebAppInfoFromManifest(const blink::mojom::Manifest& manifest,
const GURL& manifest_url,
- WebApplicationInfo* web_app_info) {
+ WebAppInstallInfo* web_app_info) {
// Give the full length name priority if it's not empty.
std::u16string name = manifest.name.value_or(std::u16string());
if (!name.empty())
@@ -413,7 +413,7 @@
if (!manifest.display_override.empty())
web_app_info->display_override = manifest.display_override;

- // Create the WebApplicationInfo icons list *outside* of |web_app_info|, so
+ // Create the WebAppInstallInfo icons list *outside* of |web_app_info|, so
// that we can decide later whether or not to replace the existing icons.
std::vector<apps::IconInfo> web_app_icons;
for (const auto& icon : manifest.icons) {
@@ -490,7 +490,7 @@
}

std::vector<GURL> GetValidIconUrlsToDownload(
- const WebApplicationInfo& web_app_info) {
+ const WebAppInstallInfo& web_app_info) {
std::vector<GURL> web_app_info_icon_urls;
// App icons.
for (const apps::IconInfo& info : web_app_info.manifest_icons) {
@@ -523,13 +523,13 @@
return web_app_info_icon_urls;
}

-void PopulateOtherIcons(WebApplicationInfo* web_app_info,
+void PopulateOtherIcons(WebAppInstallInfo* web_app_info,
const IconsMap& icons_map) {
PopulateShortcutItemIcons(web_app_info, icons_map);
PopulateFileHandlingIcons(web_app_info, icons_map);
}

-void PopulateProductIcons(WebApplicationInfo* web_app_info,
+void PopulateProductIcons(WebAppInstallInfo* web_app_info,
const IconsMap* icons_map) {
std::vector<apps::IconInfo> manifest_icons_any;
std::vector<apps::IconInfo> manifest_icons_maskable;
diff --git a/chrome/browser/web_applications/web_app_install_utils.h b/chrome/browser/web_applications/web_app_install_utils.h
index b415ec4..ce85817 100644
--- a/chrome/browser/web_applications/web_app_install_utils.h
+++ b/chrome/browser/web_applications/web_app_install_utils.h
@@ -47,21 +47,21 @@
manifest_file_handlers,
const GURL& app_scope);

-// Update the given WebApplicationInfo with information from the manifest.
+// Update the given WebAppInstallInfo with information from the manifest.
// Will sanitise the manifest fields to be suitable for installation to prevent
// sites from using arbitrarily large amounts of disk space.
void UpdateWebAppInfoFromManifest(const blink::mojom::Manifest& manifest,
const GURL& manifest_url,
- WebApplicationInfo* web_app_info);
+ WebAppInstallInfo* web_app_info);

// Form a list of icons to download: Remove icons with invalid urls.
std::vector<GURL> GetValidIconUrlsToDownload(
- const WebApplicationInfo& web_app_info);
+ const WebAppInstallInfo& web_app_info);

-// Populate non-product icons in WebApplicationInfo using the IconsMap. This
+// Populate non-product icons in WebAppInstallInfo using the IconsMap. This
// currently covers shortcut item icons and file handler icons. It ignores
// icons that might have already existed in `web_app_info`.
-void PopulateOtherIcons(WebApplicationInfo* web_app_info,
+void PopulateOtherIcons(WebAppInstallInfo* web_app_info,
const IconsMap& icons_map);

// Populates main product icons into `web_app_info`. This method filters icons
@@ -70,7 +70,7 @@
// `icons_map` is null or missing icons, it will generate icons for sizes where
// resizing is not possible. Icons which were already populated in
// `web_app_info` may be retained, and even used to generate missing icons.
-void PopulateProductIcons(WebApplicationInfo* web_app_info,
+void PopulateProductIcons(WebAppInstallInfo* web_app_info,
const IconsMap* icons_map);

// Record an app banner added to homescreen event to ensure banners are not
diff --git a/chrome/browser/web_applications/web_app_install_utils_unittest.cc b/chrome/browser/web_applications/web_app_install_utils_unittest.cc
index a720bc4..bd4a9dbf 100644
--- a/chrome/browser/web_applications/web_app_install_utils_unittest.cc
+++ b/chrome/browser/web_applications/web_app_install_utils_unittest.cc
@@ -72,7 +72,7 @@
base::test::ScopedFeatureList feature_list(
blink::features::kFileHandlingIcons);

- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
web_app_info.title = kAlternativeAppTitle;
web_app_info.start_url = GURL("http://www.notchromium.org");
apps::IconInfo info;
@@ -207,7 +207,7 @@
}

TEST(WebAppInstallUtils, UpdateWebAppInfoFromManifest_EmptyName) {
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;

blink::mojom::Manifest manifest;
manifest.name = absl::nullopt;
@@ -233,7 +233,7 @@
// Produces 1 icon_info.
icon.purpose = {Purpose::MONOCHROME};
manifest.icons.push_back(icon);
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;

UpdateWebAppInfoFromManifest(
manifest, GURL("http://www.chromium.org/manifest.json"), &web_app_info);
@@ -254,8 +254,8 @@
icon.src = GURL("fav1.png");
icon.purpose = {Purpose::MASKABLE};
manifest.icons.push_back(icon);
- // WebApplicationInfo has existing icons (simulating found in page metadata).
- WebApplicationInfo web_app_info;
+ // WebAppInstallInfo has existing icons (simulating found in page metadata).
+ WebAppInstallInfo web_app_info;
apps::IconInfo icon_info;
web_app_info.manifest_icons.push_back(icon_info);
web_app_info.manifest_icons.push_back(icon_info);
@@ -268,7 +268,7 @@

TEST(WebAppInstallUtils, UpdateWebAppInfoFromManifest_ShareTarget) {
blink::mojom::Manifest manifest;
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;

{
blink::Manifest::ShareTarget share_target;
@@ -345,7 +345,7 @@
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures({blink::features::kFileHandlingIcons}, {});

- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
web_app_info.title = kAlternativeAppTitle;
web_app_info.start_url = GURL("http://www.notchromium.org");
apps::IconInfo info;
@@ -388,7 +388,7 @@
url_handler->has_origin_wildcard = true;
manifest.url_handlers.push_back(std::move(url_handler));
}
- WebApplicationInfo web_app_info_original{web_app_info};
+ WebAppInstallInfo web_app_info_original{web_app_info};

const GURL kAppManifestUrl("http://www.chromium.org/manifest.json");
UpdateWebAppInfoFromManifest(manifest, kAppManifestUrl, &web_app_info);
@@ -521,7 +521,7 @@
icon.sizes.emplace_back(i, i);
manifest.icons.push_back(std::move(icon));
}
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;

UpdateWebAppInfoFromManifest(
manifest, GURL("http://www.chromium.org/manifest.json"), &web_app_info);
@@ -544,7 +544,7 @@

manifest.shortcuts.push_back(shortcut_item);
}
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
UpdateWebAppInfoFromManifest(
manifest, GURL("http://www.chromium.org/manifest.json"), &web_app_info);

@@ -571,7 +571,7 @@
manifest.icons.push_back(std::move(icon));
}

- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
UpdateWebAppInfoFromManifest(
manifest, GURL("http://www.chromium.org/manifest.json"), &web_app_info);

@@ -598,7 +598,7 @@

manifest.shortcuts.push_back(shortcut_item);
}
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
UpdateWebAppInfoFromManifest(
manifest, GURL("http://www.chromium.org/manifest.json"), &web_app_info);

@@ -615,7 +615,7 @@
// Tests that SkBitmaps associated with shortcut item icons are populated in
// their own map in web_app_info.
TEST(WebAppInstallUtils, PopulateShortcutItemIcons) {
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
WebAppShortcutsMenuItemInfo::Icon icon;

const GURL kIconUrl1("http://www.chromium.org/shortcuts/icon1.png");
@@ -670,7 +670,7 @@
// Tests that when PopulateOtherItemIcons is called with no shortcut icon
// urls specified, no data is written to shortcuts_menu_item_infos.
TEST(WebAppInstallUtils, PopulateShortcutItemIconsNoShortcutIcons) {
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
IconsMap icons_map;
std::vector<SkBitmap> bmp1 = {CreateSquareIcon(32, SK_ColorWHITE)};
std::vector<SkBitmap> bmp2 = {CreateSquareIcon(32, SK_ColorBLUE)};
@@ -698,7 +698,7 @@
icons_map.emplace(kIconUrl2, bmp2);

// Construct |web_app_info| to pass icon infos.
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
web_app_info.title = u"App Name";
apps::IconInfo info;
// Icon at URL 1 has both kAny and kMaskable purpose.
@@ -732,7 +732,7 @@
icons_map.emplace(kIconUrl1, bmp1);

// Construct |web_app_info| to pass icon infos.
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
web_app_info.title = u"App Name";
apps::IconInfo info;
info.url = kIconUrl1;
@@ -749,7 +749,7 @@
}

TEST(WebAppInstallUtils, UpdateWebAppInfoFromManifest_InvalidManifestUrl) {
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
blink::mojom::Manifest manifest;

UpdateWebAppInfoFromManifest(manifest, GURL("foo"), &web_app_info);
@@ -760,7 +760,7 @@
// app icon or shortcut icon data in web_app_info, and kDesktopPWAShortcutsMenu
// feature enabled, web_app_info.icon_bitmaps_any is correctly populated.
TEST(WebAppInstallUtils, PopulateProductIconsNoWebAppIconData_WithShortcuts) {
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
web_app_info.title = u"App Name";

IconsMap icons_map;
@@ -777,7 +777,7 @@

TEST(WebAppInstallUtils, PopulateProductIcons_IsGeneratedIcon) {
{
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
web_app_info.title = u"App Name";

IconsMap icons_map;
@@ -788,7 +788,7 @@
EXPECT_TRUE(ContainsOneIconOfEachSize(web_app_info.icon_bitmaps.any));
}
{
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
web_app_info.title = u"App Name";

IconsMap icons_map;
@@ -805,7 +805,7 @@
EXPECT_EQ(SK_ColorCYAN, bitmap_any.second.getColor(0, 0));
}
{
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
web_app_info.title = u"App Name";

IconsMap icons_map;
@@ -825,7 +825,7 @@

TEST(WebAppInstallUtils, UpdateWebAppInfoFromManifest_Translations) {
blink::mojom::Manifest manifest;
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;

{
blink::Manifest::TranslationItem item;
@@ -982,7 +982,7 @@

std::vector<blink::mojom::ManifestFileHandlerPtr> manifest_file_handlers =
CreateManifestFileHandlers(1);
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
web_app_info.file_handlers =
CreateFileHandlersFromManifest(manifest_file_handlers, GetStartUrl());

diff --git a/chrome/browser/web_applications/web_app_installation_utils.cc b/chrome/browser/web_applications/web_app_installation_utils.cc
index 4c2f2226..555537e 100644
--- a/chrome/browser/web_applications/web_app_installation_utils.cc
+++ b/chrome/browser/web_applications/web_app_installation_utils.cc
@@ -62,7 +62,7 @@

} // namespace

-void SetWebAppManifestFields(const WebApplicationInfo& web_app_info,
+void SetWebAppManifestFields(const WebAppInstallInfo& web_app_info,
WebApp& web_app) {
DCHECK(!web_app_info.title.empty());
web_app.SetName(base::UTF16ToUTF8(web_app_info.title));
diff --git a/chrome/browser/web_applications/web_app_installation_utils.h b/chrome/browser/web_applications/web_app_installation_utils.h
index 3032c07..0db6a8e 100644
--- a/chrome/browser/web_applications/web_app_installation_utils.h
+++ b/chrome/browser/web_applications/web_app_installation_utils.h
@@ -7,7 +7,7 @@

#include "chrome/browser/web_applications/web_app_id.h"

-struct WebApplicationInfo;
+struct WebAppInstallInfo;

namespace web_app {

@@ -16,7 +16,7 @@
class WebApp;

// Updates |web_app| using |web_app_info|
-void SetWebAppManifestFields(const WebApplicationInfo& web_app_info,
+void SetWebAppManifestFields(const WebAppInstallInfo& web_app_info,
WebApp& web_app);

// Possibly updates |options| to disable OS-integrations based on the
diff --git a/chrome/browser/web_applications/web_app_installation_utils_unittest.cc b/chrome/browser/web_applications/web_app_installation_utils_unittest.cc
index bb2102d..4556c76 100644
--- a/chrome/browser/web_applications/web_app_installation_utils_unittest.cc
+++ b/chrome/browser/web_applications/web_app_installation_utils_unittest.cc
@@ -32,7 +32,7 @@
} // namespace

TEST(WebAppInstallationUtils, SetWebAppManifestFields_Summary) {
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
web_app_info.start_url = GURL("https://www.chromium.org/index.html");
web_app_info.scope = web_app_info.start_url.GetWithoutFilename();
web_app_info.title = u"App Name";
@@ -71,7 +71,7 @@
}

TEST(WebAppInstallationUtils, SetWebAppManifestFields_ShareTarget) {
- WebApplicationInfo web_app_info;
+ WebAppInstallInfo web_app_info;
web_app_info.start_url = StartUrl();
web_app_info.scope = web_app_info.start_url.GetWithoutFilename();
web_app_info.title = u"App Name";
diff --git a/chrome/browser/web_applications/web_app_mover.cc b/chrome/browser/web_applications/web_app_mover.cc
index 0205f86..4f49cbe 100644
--- a/chrome/browser/web_applications/web_app_mover.cc
+++ b/chrome/browser/web_applications/web_app_mover.cc
@@ -301,7 +301,7 @@
web_contents, true, webapps::WebappInstallSource::OMNIBOX_INSTALL_ICON,
base::BindOnce(
[](content::WebContents* initiator_web_contents,
- std::unique_ptr<WebApplicationInfo> web_app_info,
+ std::unique_ptr<WebAppInstallInfo> web_app_info,
ForInstallableSite for_installable_site,
WebAppInstallationAcceptanceCallback acceptance_callback) {
// Note: |open_as_window| is set to false here (which it should be
diff --git a/chrome/browser/web_applications/web_application_info.cc b/chrome/browser/web_applications/web_application_info.cc
index 1b56eb6..3310e07 100644
--- a/chrome/browser/web_applications/web_application_info.cc
+++ b/chrome/browser/web_applications/web_application_info.cc
@@ -212,13 +212,12 @@
return root;
}

-// WebApplicationInfo
-WebApplicationInfo::WebApplicationInfo() = default;
+// WebAppInstallInfo
+WebAppInstallInfo::WebAppInstallInfo() = default;

-WebApplicationInfo::WebApplicationInfo(const WebApplicationInfo& other) =
- default;
+WebAppInstallInfo::WebAppInstallInfo(const WebAppInstallInfo& other) = default;

-WebApplicationInfo::WebApplicationInfo(
+WebAppInstallInfo::WebAppInstallInfo(
const webapps::mojom::WebPageMetadata& metadata)
: title(metadata.application_name),
description(metadata.description),
@@ -243,7 +242,7 @@
}
}

-WebApplicationInfo::~WebApplicationInfo() = default;
+WebAppInstallInfo::~WebAppInstallInfo() = default;

bool operator==(const IconSizes& icon_sizes1, const IconSizes& icon_sizes2) {
return std::tie(icon_sizes1.any, icon_sizes1.maskable,
diff --git a/chrome/browser/web_applications/web_application_info.h b/chrome/browser/web_applications/web_application_info.h
index 2fbc940..c59601b 100644
--- a/chrome/browser/web_applications/web_application_info.h
+++ b/chrome/browser/web_applications/web_application_info.h
@@ -165,17 +165,17 @@
};

// Structure used when installing a web page as an app.
-struct WebApplicationInfo {
+struct WebAppInstallInfo {
enum MobileCapable {
MOBILE_CAPABLE_UNSPECIFIED,
MOBILE_CAPABLE,
MOBILE_CAPABLE_APPLE
};

- WebApplicationInfo();
- WebApplicationInfo(const WebApplicationInfo& other);
- explicit WebApplicationInfo(const webapps::mojom::WebPageMetadata& metadata);
- ~WebApplicationInfo();
+ WebAppInstallInfo();
+ WebAppInstallInfo(const WebAppInstallInfo& other);
+ explicit WebAppInstallInfo(const webapps::mojom::WebPageMetadata& metadata);
+ ~WebAppInstallInfo();

// Id specified in the manifest.
absl::optional<std::string> manifest_id;
diff --git a/components/webapps/browser/android/add_to_homescreen_data_fetcher.h b/components/webapps/browser/android/add_to_homescreen_data_fetcher.h
index e5031bc..9eb6e68 100644
--- a/components/webapps/browser/android/add_to_homescreen_data_fetcher.h
+++ b/components/webapps/browser/android/add_to_homescreen_data_fetcher.h
@@ -50,7 +50,7 @@

// Initialize the fetcher by requesting the information about the page from
// the renderer process. The initialization is asynchronous and
- // OnDidGetWebApplicationInfo is expected to be called when finished.
+ // OnDidGetWebAppInstallInfo is expected to be called when finished.
// |observer| must outlive AddToHomescreenDataFetcher.
AddToHomescreenDataFetcher(content::WebContents* web_contents,
int data_timeout_ms,
diff --git a/components/webapps/browser/android/add_to_homescreen_data_fetcher_unittest.cc b/components/webapps/browser/android/add_to_homescreen_data_fetcher_unittest.cc
index 3bda3494..801c5b6b 100644
--- a/components/webapps/browser/android/add_to_homescreen_data_fetcher_unittest.cc
+++ b/components/webapps/browser/android/add_to_homescreen_data_fetcher_unittest.cc
@@ -38,7 +38,7 @@

namespace {

-const char* kWebApplicationInfoTitle = "Meta Title";
+const char* kWebAppInstallInfoTitle = "Meta Title";
const char* kDefaultManifestUrl = "https://www.example.com/manifest.json";
const char* kDefaultIconUrl = "https://www.example.com/icon.png";
const char* kDefaultManifestName = "Default Name";
@@ -253,7 +253,7 @@
webapps::mojom::WebPageMetadataPtr web_page_metadata(
webapps::mojom::WebPageMetadata::New());
web_page_metadata->application_name =
- base::ASCIIToUTF16(kWebApplicationInfoTitle);
+ base::ASCIIToUTF16(kWebAppInstallInfoTitle);

fetcher->OnDidGetWebPageMetadata(
mojo::AssociatedRemote<webapps::mojom::WebPageMetadataAgent>(),
@@ -329,7 +329,7 @@
base::HistogramTester histograms;
ObserverWaiter waiter;
std::unique_ptr<AddToHomescreenDataFetcher> fetcher = BuildFetcher(&waiter);
- RunFetcher(fetcher.get(), waiter, kWebApplicationInfoTitle,
+ RunFetcher(fetcher.get(), waiter, kWebAppInstallInfoTitle,
blink::mojom::DisplayMode::kBrowser, false);
CheckHistograms(histograms);
}
@@ -366,7 +366,7 @@
base::HistogramTester histograms;
ObserverWaiter waiter;
std::unique_ptr<AddToHomescreenDataFetcher> fetcher = BuildFetcher(&waiter);
- RunFetcher(fetcher.get(), waiter, kWebApplicationInfoTitle,
+ RunFetcher(fetcher.get(), waiter, kWebAppInstallInfoTitle,
blink::mojom::DisplayMode::kBrowser, false);
CheckHistograms(histograms);

@@ -384,7 +384,7 @@
base::HistogramTester histograms;
ObserverWaiter waiter;
std::unique_ptr<AddToHomescreenDataFetcher> fetcher = BuildFetcher(&waiter);
- RunFetcher(fetcher.get(), waiter, kWebApplicationInfoTitle,
+ RunFetcher(fetcher.get(), waiter, kWebAppInstallInfoTitle,
blink::mojom::DisplayMode::kBrowser, false);
CheckHistograms(histograms);

@@ -401,7 +401,7 @@
base::HistogramTester histograms;
ObserverWaiter waiter;
std::unique_ptr<AddToHomescreenDataFetcher> fetcher = BuildFetcher(&waiter);
- RunFetcher(fetcher.get(), waiter, kWebApplicationInfoTitle,
+ RunFetcher(fetcher.get(), waiter, kWebAppInstallInfoTitle,
blink::mojom::DisplayMode::kBrowser, false);
NavigateAndCommit(GURL("about:blank"));
CheckHistograms(histograms);
@@ -570,7 +570,7 @@
// Test that when the manifest does not provide either Manifest::short_name
// nor Manifest::name that:
// - The page is not WebAPK compatible.
- // - WebApplicationInfo::title is used as the "name".
+ // - WebAppInstallInfo::title is used as the "name".
// - We still use the icons from the manifest.
blink::mojom::ManifestPtr manifest = BuildDefaultManifest();
manifest->name = absl::nullopt;
@@ -580,13 +580,13 @@
SetManifest(std::move(manifest));
ObserverWaiter waiter;
std::unique_ptr<AddToHomescreenDataFetcher> fetcher = BuildFetcher(&waiter);
- RunFetcher(fetcher.get(), waiter, kWebApplicationInfoTitle,
+ RunFetcher(fetcher.get(), waiter, kWebAppInstallInfoTitle,
blink::mojom::DisplayMode::kStandalone, false);

EXPECT_TRUE(base::EqualsASCII(fetcher->shortcut_info().name,
- kWebApplicationInfoTitle));
+ kWebAppInstallInfoTitle));
EXPECT_TRUE(base::EqualsASCII(fetcher->shortcut_info().short_name,
- kWebApplicationInfoTitle));
+ kWebAppInstallInfoTitle));
EXPECT_FALSE(fetcher->primary_icon().drawsNothing());
EXPECT_EQ(fetcher->shortcut_info().best_primary_icon_url,
GURL(kDefaultIconUrl));
Reply all
Reply to author
Forward
0 new messages