Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2079)

Unified Diff: chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc

Issue 2387613003: Reland: Make it clear that AddToHomescreenDataFetcher ignores WebApplicationInfo for WebAPKs (Closed)
Patch Set: Merge branch 'master' into test_flaky Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
diff --git a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
index 194fc6366dd1cd6d8655abbcbd700de9716fbaa2..68fc309f1a46944b10ab5eaf7d6e365d7b502a6e 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
+++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
@@ -104,8 +104,6 @@ void AddToHomescreenDataFetcher::OnDidGetWebApplicationInfo(
WebApplicationInfo web_app_info = received_web_app_info;
web_app_info.title =
web_app_info.title.substr(0, chrome::kMaxMetaTagAttributeLength);
- web_app_info.description =
- web_app_info.description.substr(0, chrome::kMaxMetaTagAttributeLength);
// Simply set the user-editable title to be the page's title
shortcut_info_.user_title = web_app_info.title.empty()
@@ -201,6 +199,11 @@ void AddToHomescreenDataFetcher::OnDidPerformInstallableCheck(
(data.error_code == NO_ERROR_DETECTED &&
AreWebManifestUrlsWebApkCompatible(data.manifest));
weak_observer_->OnDidDetermineWebApkCompatibility(webapk_compatible);
+
+ // WebAPKs are wholly defined by the Web Manifest. Ignore the <meta> tag
+ // data received in OnDidGetWebApplicationInfo().
+ if (webapk_compatible)
+ shortcut_info_ = ShortcutInfo(GURL());
}
if (!data.manifest.IsEmpty()) {

Powered by Google App Engine
This is Rietveld 408576698