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

Unified Diff: chrome/browser/themes/theme_service.cc

Issue 1813393002: Don't fall back to default incognito colors and tints when using a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/theme_service.cc
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
index 91d8f54390f9fe39054418247f1c0fe84233c208..a8be0886e82a1664c06e366e787002af5196f71c 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -498,7 +498,10 @@ SkColor ThemeService::GetDefaultColor(int id, bool incognito) const {
#endif
}
- return ThemeProperties::GetDefaultColor(id, incognito);
+ // Always fall back to the non-incognito color when there's a custom theme
+ // because the default (classic) incognito color may be dramatically different
+ // (optimized for a light-on-dark color).
+ return ThemeProperties::GetDefaultColor(id, incognito && !theme_supplier_);
}
color_utils::HSL ThemeService::GetTint(int id, bool incognito) const {
@@ -508,7 +511,9 @@ color_utils::HSL ThemeService::GetTint(int id, bool incognito) const {
if (theme_supplier_ && theme_supplier_->GetTint(id, &hsl))
return hsl;
- return ThemeProperties::GetDefaultTint(id, incognito);
+ // Always fall back to the non-incognito tint when there's a custom theme.
+ // See comment in GetDefaultColor().
+ return ThemeProperties::GetDefaultTint(id, incognito && !theme_supplier_);
}
void ThemeService::ClearAllThemeData() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698