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

Unified Diff: chrome/browser/installable/installable_manager.cc

Issue 2791923005: Fails InstallableManager if a selected badge icon cannot be fetched. (Closed)
Patch Set: Addressing comments Created 3 years, 8 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
Index: chrome/browser/installable/installable_manager.cc
diff --git a/chrome/browser/installable/installable_manager.cc b/chrome/browser/installable/installable_manager.cc
index 1b9b10b3004bf11e970295a338066ea447db2c0f..e6ba18b06bf5760fe69b35d0ba46cbdddae2f67a 100644
--- a/chrome/browser/installable/installable_manager.cc
+++ b/chrome/browser/installable/installable_manager.cc
@@ -230,7 +230,16 @@ InstallableStatusCode InstallableManager::GetErrorCode(
return icon.error;
}
- // Do not report badge icon's error because badge icon is optional.
+ if (params.fetch_valid_badge_icon) {
+ IconProperty& icon = icons_[ParamsForBadgeIcon(params)];
+
+ // If the error is NO_ACCEPTABLE_ICON, there is no icon suitable as a badge
+ // in the manifest. Ignore this case since we only want to fail the check if
+ // there was a suitable badge icon specified and we couldn't fetch it.
+ if (icon.error != NO_ERROR_DETECTED && icon.error != NO_ACCEPTABLE_ICON)
+ return icon.error;
+ }
+
return NO_ERROR_DETECTED;
}
« no previous file with comments | « chrome/browser/installable/installable_logging.cc ('k') | chrome/browser/installable/installable_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698