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

Unified Diff: chrome/browser/manifest/manifest_icon_selector.h

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 | « chrome/browser/banners/app_banner_debug_log.cc ('k') | chrome/browser/manifest/manifest_icon_selector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/manifest/manifest_icon_selector.h
diff --git a/chrome/browser/manifest/manifest_icon_selector.h b/chrome/browser/manifest/manifest_icon_selector.h
index da2b7f6571292fb79dd7bfcb9a2474ac9b5bb13b..9d9736d6bd7fe12258f4cb3ba09076ed72fd0fb5 100644
--- a/chrome/browser/manifest/manifest_icon_selector.h
+++ b/chrome/browser/manifest/manifest_icon_selector.h
@@ -42,6 +42,8 @@ class ManifestIconSelector {
int ideal_icon_size_in_dp,
int minimum_icon_size_in_dp);
+ static int ConvertIconSizeFromDpToPx(int icon_size_in_dp);
+
private:
ManifestIconSelector(int ideal_icon_size_in_px,
int minimum_icon_size_in_px);
@@ -50,9 +52,7 @@ class ManifestIconSelector {
// Runs the algorithm to find the best matching icon in the icons listed in
// the Manifest.
// Returns the icon url if a suitable icon is found. An empty URL otherwise.
- int FindBestMatchingIcon(
- const std::vector<content::Manifest::Icon>& icons,
- float density);
+ int FindBestMatchingIcon(const std::vector<content::Manifest::Icon>& icons);
// Runs an algorithm only based on icon declared sizes. It will try to find
// size that is the closest to preferred_icon_size_in_pixels_ but bigger than
@@ -80,6 +80,7 @@ class ManifestIconSelector {
const int ideal_icon_size_in_px_;
const int minimum_icon_size_in_px_;
+ const float density_;
friend class ManifestIconSelectorTest;
« no previous file with comments | « chrome/browser/banners/app_banner_debug_log.cc ('k') | chrome/browser/manifest/manifest_icon_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698