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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 1805393002: Added MediaRouterUIBrowserTest::toolbar_action_view_ to a Widget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Proposed solution. 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
Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
index 63a34c6ef1fce783b482cf61e5c3771f43be5e06..c71b27b9494ab2ed508164f0948f161248fe6bc9 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -242,13 +242,9 @@ class BookmarkButtonBase : public views::LabelButton {
}
SkColor GetInkDropBaseColor() const override {
- // TODO(bruthig): Inject the color instead of assuming a ThemeProvider is
- // always available. Fall back on LabelButton::GetInkDropBaseColor() so as
- // to avoid difficult to track down crashes.
- return GetThemeProvider()
- ? GetThemeProvider()->GetColor(
- ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON)
- : views::LabelButton::GetInkDropBaseColor();
+ DCHECK(GetThemeProvider());
Evan Stade 2016/03/17 21:41:35 the style guide says not to dcheck right before de
bruthig 2016/03/18 00:22:41 Yeah, I know that the style guide says to avoid th
Evan Stade 2016/03/18 01:20:22 add a debug line: base::debug::StackTrace().Print(
bruthig 2016/03/18 15:39:21 Removed.
+ return GetThemeProvider()->GetColor(
+ ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON);
}
private:
@@ -345,10 +341,9 @@ class BookmarkMenuButtonBase : public views::MenuButton {
}
SkColor GetInkDropBaseColor() const override {
- return GetThemeProvider()
- ? GetThemeProvider()->GetColor(
- ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON)
- : views::LabelButton::GetInkDropBaseColor();
+ DCHECK(GetThemeProvider());
+ return GetThemeProvider()->GetColor(
+ ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON);
}
private:

Powered by Google App Engine
This is Rietveld 408576698