Chromium Code Reviews| 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 7d107a22b8624ec026336548246b366c197c2d87..bb0007de15450f574e4deee7aafb2e9d8c88cd53 100644 |
| --- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc |
| +++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc |
| @@ -113,8 +113,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); |
|
Xi Han
2016/09/26 17:48:12
Doesn't regular web app still need this?
pkotwicz
2016/09/26 20:13:47
|web_app_info| is a variable which is local to the
Xi Han
2016/09/26 20:15:41
Acknowledged.
|
| // Simply set the user-editable title to be the page's title |
| shortcut_info_.user_title = web_app_info.title.empty() |
| @@ -205,8 +203,17 @@ void AddToHomescreenDataFetcher::OnDidPerformInstallableCheck( |
| is_installable_check_complete_ = true; |
| - if (check_webapk_compatibility_) |
| - weak_observer_->OnDidDetermineWebApkCompatibility(data.is_installable); |
| + bool webapk_compatible = false; |
| + if (check_webapk_compatibility_) { |
| + webapk_compatible = data.is_installable; |
| + 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()); |
|
dominickn
2016/09/27 01:51:28
Nit: remove braces. Also, move this check into the
|
| + } |
| if (!data.manifest.IsEmpty()) { |
| content::RecordAction( |