Chromium Code Reviews| Index: chrome/browser/ui/search/search_ui.cc |
| diff --git a/chrome/browser/ui/search/search_ui.cc b/chrome/browser/ui/search/search_ui.cc |
| index 887339a443902d2595fae7dcc0b92eaade2a69ff..3da13122603ef13e4971ad7d2e50dac1c96ee648 100644 |
| --- a/chrome/browser/ui/search/search_ui.cc |
| +++ b/chrome/browser/ui/search/search_ui.cc |
| @@ -6,28 +6,35 @@ |
| #include "chrome/browser/themes/theme_properties.h" |
| #include "chrome/browser/themes/theme_service.h" |
| +#include "chrome/browser/themes/theme_service_factory.h" |
| #include "ui/base/resource/material_design/material_design_controller.h" |
| namespace chrome { |
| -SkColor GetDetachedBookmarkBarBackgroundColor(ThemeService* theme_service) { |
| - if (!theme_service->UsingDefaultTheme()) |
| - return theme_service->GetColor(ThemeProperties::COLOR_TOOLBAR); |
| +SkColor GetDetachedBookmarkBarBackgroundColor(Profile* profile) { |
| + ThemeService* service = ThemeServiceFactory::GetForProfile(profile); |
|
Peter Kasting
2015/12/09 01:31:59
Nit: Could inline into next line (2 places)
Evan Stade
2015/12/09 01:57:06
Done.
|
| + if (!service->UsingDefaultTheme()) { |
| + return ThemeService::GetThemeProviderForProfile(profile) |
| + .GetColor(ThemeProperties::COLOR_TOOLBAR); |
| + } |
| return ui::MaterialDesignController::IsModeMaterial() |
| ? SK_ColorWHITE |
| : SkColorSetARGB(0xFF, 0xF1, 0xF1, 0xF1); |
| } |
| -SkColor GetDetachedBookmarkBarSeparatorColor(ThemeService* theme_service) { |
| - if (theme_service->UsingDefaultTheme()) { |
| +SkColor GetDetachedBookmarkBarSeparatorColor(Profile* profile) { |
| + ThemeService* service = ThemeServiceFactory::GetForProfile(profile); |
| + if (service->UsingDefaultTheme()) { |
| return ThemeProperties::GetDefaultColor( |
| ThemeProperties::COLOR_TOOLBAR_SEPARATOR); |
| } |
| + const ui::ThemeProvider& provider = |
| + ThemeService::GetThemeProviderForProfile(profile); |
| // Use 50% of bookmark text color as separator color. |
| - return SkColorSetA( |
| - theme_service->GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT), 128); |
| + return SkColorSetA(provider.GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT), |
| + 128); |
| } |
| } // namespace chrome |