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

Unified Diff: components/favicon_base/fallback_icon_url_parser.cc

Issue 2374753002: Track when fallback icon color is the default. (Closed)
Patch Set: Merge branch 'refs/heads/master' into default-color Created 4 years, 2 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: components/favicon_base/fallback_icon_url_parser.cc
diff --git a/components/favicon_base/fallback_icon_url_parser.cc b/components/favicon_base/fallback_icon_url_parser.cc
index 8855695bfdfb88dd3211a847c6b3fbc1859c1f58..214c88ff9df24caf2f9022fc64da95f593f7456f 100644
--- a/components/favicon_base/fallback_icon_url_parser.cc
+++ b/components/favicon_base/fallback_icon_url_parser.cc
@@ -85,8 +85,13 @@ bool ParsedFallbackIconPath::ParseSpecs(
if (*size <= 0)
return false;
- if (!tokens[1].empty() && !ParseColor(tokens[1], &style->background_color))
- return false;
+ *style = favicon_base::FallbackIconStyle();
+
+ if (!tokens[1].empty()) {
+ style->is_default_background_color = false;
+ if (!ParseColor(tokens[1], &style->background_color))
+ return false;
+ }
if (tokens[2].empty())
favicon_base::MatchFallbackIconTextColorAgainstBackgroundColor(style);
« no previous file with comments | « components/favicon_base/fallback_icon_style.cc ('k') | components/favicon_base/fallback_icon_url_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698