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

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: Merge branch 'reenable_tests000' into reenable_tests00 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..ba22b5dfa53788290809cd60a50c0aa5c604ff75 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,12 @@ void AddToHomescreenDataFetcher::OnDidPerformInstallableCheck(
if (data.primary_icon) {
shortcut_info_.best_primary_icon_url = data.primary_icon_url;
- CreateLauncherIcon(*(data.primary_icon));
+ if (webapk_compatible) {
dominickn 2017/06/15 03:01:27 The multiple returns here are a bit strange. Can w
+ NotifyObserver(*data.primary_icon);
+ return;
+ }
+
+ 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