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

Unified Diff: chrome/browser/ui/views/harmony/layout_delegate.cc

Issue 2748363002: Fix UBSan testing builds (Closed)
Patch Set: Created 3 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 | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/harmony/layout_delegate.cc
diff --git a/chrome/browser/ui/views/harmony/layout_delegate.cc b/chrome/browser/ui/views/harmony/layout_delegate.cc
index 79d88b025d46793b2f222bb49774826f079f2359..b998aa3fac823c66829717cb04bc06e687fe0d02 100644
--- a/chrome/browser/ui/views/harmony/layout_delegate.cc
+++ b/chrome/browser/ui/views/harmony/layout_delegate.cc
@@ -24,7 +24,7 @@ LayoutDelegate* LayoutDelegate::Get() {
int LayoutDelegate::GetMetric(Metric metric) const {
switch (metric) {
case Metric::BUTTON_HORIZONTAL_PADDING:
- return ChromeViewsDelegate::GetInstance()->GetDefaultDistanceMetric(
+ return ChromeViewsDelegate::GetDefaultDistanceMetric(
views::DistanceMetric::BUTTON_HORIZONTAL_PADDING);
case Metric::BUTTON_MAX_LINKABLE_WIDTH:
return 0; // Buttons never expand during layout (add padding instead).
@@ -33,23 +33,23 @@ int LayoutDelegate::GetMetric(Metric metric) const {
case Metric::DIALOG_BUTTON_MARGIN:
return views::kButtonHEdgeMarginNew;
case Metric::DIALOG_BUTTON_MINIMUM_WIDTH:
- return ChromeViewsDelegate::GetInstance()->GetDefaultDistanceMetric(
+ return ChromeViewsDelegate::GetDefaultDistanceMetric(
views::DistanceMetric::DIALOG_BUTTON_MINIMUM_WIDTH);
case Metric::DIALOG_BUTTON_TOP_SPACING:
return 0;
case Metric::DIALOG_CLOSE_BUTTON_MARGIN:
- return ChromeViewsDelegate::GetInstance()->GetDefaultDistanceMetric(
+ return ChromeViewsDelegate::GetDefaultDistanceMetric(
views::DistanceMetric::CLOSE_BUTTON_MARGIN);
case Metric::PANEL_CONTENT_MARGIN:
return views::kPanelHorizMargin;
case Metric::RELATED_BUTTON_HORIZONTAL_SPACING:
- return ChromeViewsDelegate::GetInstance()->GetDefaultDistanceMetric(
+ return ChromeViewsDelegate::GetDefaultDistanceMetric(
views::DistanceMetric::RELATED_BUTTON_HORIZONTAL);
case Metric::RELATED_CONTROL_HORIZONTAL_SPACING:
- return ChromeViewsDelegate::GetInstance()->GetDefaultDistanceMetric(
+ return ChromeViewsDelegate::GetDefaultDistanceMetric(
views::DistanceMetric::RELATED_CONTROL_HORIZONTAL);
case Metric::RELATED_CONTROL_VERTICAL_SPACING:
- return ChromeViewsDelegate::GetInstance()->GetDefaultDistanceMetric(
+ return ChromeViewsDelegate::GetDefaultDistanceMetric(
views::DistanceMetric::RELATED_CONTROL_VERTICAL);
case Metric::RELATED_LABEL_HORIZONTAL_SPACING:
return views::kItemLabelSpacing;
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698