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

Unified Diff: content/renderer/manifest/manifest_parser.cc

Issue 1901363003: Remove support for the web manifest icon density member. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename test Created 4 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
« no previous file with comments | « content/renderer/manifest/manifest_parser.h ('k') | content/renderer/manifest/manifest_parser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/manifest/manifest_parser.cc
diff --git a/content/renderer/manifest/manifest_parser.cc b/content/renderer/manifest/manifest_parser.cc
index a8f5520037b83f4f65d43349753477b5f76da826..40d4d3311004f334c47ebb315459bb413943b7a3 100644
--- a/content/renderer/manifest/manifest_parser.cc
+++ b/content/renderer/manifest/manifest_parser.cc
@@ -314,19 +314,6 @@ base::NullableString16 ManifestParser::ParseIconType(
return ParseString(icon, "type", Trim);
}
-double ManifestParser::ParseIconDensity(const base::DictionaryValue& icon) {
- double density;
- if (!icon.HasKey("density"))
- return Manifest::Icon::kDefaultDensity;
-
- if (!icon.GetDouble("density", &density) || density <= 0) {
- AddErrorInfo(GetErrorPrefix() +
- "icon 'density' ignored, must be float greater than 0.");
- return Manifest::Icon::kDefaultDensity;
- }
- return density;
-}
-
std::vector<gfx::Size> ManifestParser::ParseIconSizes(
const base::DictionaryValue& icon) {
base::NullableString16 sizes_str = ParseString(icon, "sizes", NoTrim);
@@ -365,7 +352,6 @@ std::vector<Manifest::Icon> ManifestParser::ParseIcons(
if (!icon.src.is_valid())
continue;
icon.type = ParseIconType(*icon_dictionary);
- icon.density = ParseIconDensity(*icon_dictionary);
icon.sizes = ParseIconSizes(*icon_dictionary);
icons.push_back(icon);
« no previous file with comments | « content/renderer/manifest/manifest_parser.h ('k') | content/renderer/manifest/manifest_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698