Chromium Code Reviews| Index: chrome/browser/themes/theme_service_mac.mm |
| diff --git a/chrome/browser/themes/theme_service_mac.mm b/chrome/browser/themes/theme_service_mac.mm |
| index 56e7f5f48d9b3c3b3f2b8272cdcb6b22f485c308..da88cdcd91ed0a01af26e4da1962363e7c77f40a 100644 |
| --- a/chrome/browser/themes/theme_service_mac.mm |
| +++ b/chrome/browser/themes/theme_service_mac.mm |
| @@ -183,7 +183,8 @@ NSColor* ThemeService::GetNSColor(int id, bool incognito) const { |
| DCHECK(CalledOnValidThread()); |
| int original_id = id; |
| - if (ui::MaterialDesignController::IsModeMaterial() && incognito) { |
| + const bool kIsModeMaterial = ui::MaterialDesignController::IsModeMaterial(); |
|
sky
2016/05/26 22:32:57
mode_material as this isn't a compile time constan
shrike
2016/05/31 16:26:34
Acknowledged.
|
| + if (kIsModeMaterial && incognito) { |
| id += kMaterialDesignIdOffset; |
| } |
| @@ -193,7 +194,12 @@ NSColor* ThemeService::GetNSColor(int id, bool incognito) const { |
| return nscolor_iter->second; |
| SkColor sk_color = GetColor(original_id, incognito); |
| - NSColor* color = skia::SkColorToCalibratedNSColor(sk_color); |
| + NSColor* color = nil; |
| + if (kIsModeMaterial) { |
| + color = skia::SkColorToSRGBNSColor(sk_color); |
| + } else { |
| + color = skia::SkColorToCalibratedNSColor(sk_color); |
| + } |
| // We loaded successfully. Cache the color. |
| if (color) |