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

Unified Diff: chrome/browser/banners/app_banner_data_fetcher.cc

Issue 1826753002: Log the expected icon size when no suitable icon for a banner is found. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/banners/app_banner_debug_log.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/banners/app_banner_data_fetcher.cc
diff --git a/chrome/browser/banners/app_banner_data_fetcher.cc b/chrome/browser/banners/app_banner_data_fetcher.cc
index 25e766096e8727dd99450eaac3d02a87d4b82857..da594dc93951d0764b937268c704dce6675aae59 100644
--- a/chrome/browser/banners/app_banner_data_fetcher.cc
+++ b/chrome/browser/banners/app_banner_data_fetcher.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/banners/app_banner_debug_log.h"
@@ -349,8 +350,16 @@ void AppBannerDataFetcher::OnHasServiceWorker(
GURL icon_url = ManifestIconSelector::FindBestMatchingIcon(
web_app_data_.icons, ideal_icon_size_in_dp_, minimum_icon_size_in_dp_);
- if (!FetchAppIcon(web_contents, icon_url)) {
- OutputDeveloperNotShownMessage(web_contents, kCannotDetermineBestIcon,
+ if (icon_url.is_empty()) {
+ OutputDeveloperNotShownMessage(
+ web_contents,
+ base::IntToString(ManifestIconSelector::ConvertIconSizeFromDpToPx(
+ minimum_icon_size_in_dp_)) +
+ kNoIconMatchingRequirements,
+ is_debug_mode_);
+ Cancel();
+ } else if (!FetchAppIcon(web_contents, icon_url)) {
+ OutputDeveloperNotShownMessage(web_contents, kCannotDownloadIcon,
is_debug_mode_);
Cancel();
}
« no previous file with comments | « no previous file | chrome/browser/banners/app_banner_debug_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698