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

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

Issue 2939773004: [Android WebAPK] Do not add padding to WebAPK primary icon (Closed)
Patch Set: Created 3 years, 6 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 | no next file » | 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 4f81469e28db610ff5cdbe43ea129c46e68967a7..f8ee3caa6493a13632c533d1cd044228eadb74a0 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
+++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
@@ -229,10 +229,10 @@ void AddToHomescreenDataFetcher::OnDidPerformInstallableCheck(
shortcut_info_.minimum_splash_image_size_in_px =
minimum_splash_image_size_in_px_;
+ bool webapk_compatible = false;
if (check_webapk_compatibility_) {
- bool webapk_compatible =
- (data.error_code == NO_ERROR_DETECTED &&
- AreWebManifestUrlsWebApkCompatible(data.manifest));
+ webapk_compatible = (data.error_code == NO_ERROR_DETECTED &&
+ AreWebManifestUrlsWebApkCompatible(data.manifest));
weak_observer_->OnDidDetermineWebApkCompatibility(webapk_compatible);
if (webapk_compatible)
@@ -244,7 +244,11 @@ void AddToHomescreenDataFetcher::OnDidPerformInstallableCheck(
if (data.primary_icon) {
shortcut_info_.best_primary_icon_url = data.primary_icon_url;
- CreateLauncherIcon(*(data.primary_icon));
+ if (webapk_compatible) {
+ NotifyObserver(*data.primary_icon);
+ return;
+ }
Xi Han 2017/06/14 16:58:26 New line here:)
+ CreateLauncherIcon(*data.primary_icon);
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698