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

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

Issue 2362813003: Make it clear that AddToHomescreenDataFetcher ignores WebApplicationInfo for WebAPK compatible pages (Closed)
Patch Set: Merge branch 'master' into remove_unneeded_var3 Created 4 years, 3 months 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
« no previous file with comments | « no previous file | chrome/browser/android/webapps/add_to_homescreen_data_fetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5f44742346e5c8d5997cd6b3bb962ca3ed151a81..3685359030886d79eb5eb65e68cbc593ef52e612 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
+++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
@@ -114,8 +114,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()
@@ -211,6 +209,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()) {
« no previous file with comments | « no previous file | chrome/browser/android/webapps/add_to_homescreen_data_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698