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

Unified Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc

Issue 2899053002: Fix the MD Incognito NTP background color regression (Closed)
Patch Set: Created 3 years, 7 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/ui/webui/ntp/ntp_resource_cache.cc
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index 761fd55ac6faeb03a2e5623d347aa5b5377f0d42..0821dfabea5542b3029e22f78905a34847468f27 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -496,10 +496,15 @@ void NTPResourceCache::CreateNewTabIncognitoCSS() {
ThemeService::GetThemeProviderForProfile(profile_);
// Get our theme colors
+ SkColor color_background_default =
+ base::FeatureList::IsEnabled(features::kMaterialDesignIncognitoNTP)
+ ? SkColorSetRGB(0x30, 0x30, 0x30)
+ : SkColorSetRGB(0x32, 0x32, 0x32);
+
SkColor color_background =
tp.HasCustomImage(IDR_THEME_NTP_BACKGROUND)
? GetThemeColor(tp, ThemeProperties::COLOR_NTP_BACKGROUND)
- : SkColorSetRGB(0x32, 0x32, 0x32);
Evan Stade 2017/05/24 00:23:43 I'm confused. Can you just remove this ternary and
msramek 2017/05/24 01:05:21 Nope. If ThemeService routes that to ThemePropert
Evan Stade 2017/05/24 02:00:25 it seems like the new ternary (the feature flag on
msramek 2017/05/24 09:32:18 Done. Thanks for the suggestion, I agree that that
+ : color_background_default;
// Generate the replacements.
ui::TemplateReplacements substitutions;
« 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