Chromium Code Reviews| Index: ash/common/system/chromeos/network/vpn_list_view.cc |
| diff --git a/ash/common/system/chromeos/network/vpn_list_view.cc b/ash/common/system/chromeos/network/vpn_list_view.cc |
| index 9831cfc997863877baf098c776b14ff74976d8db..112c7d26de65b76e355cc5ab72ef545662b37317 100644 |
| --- a/ash/common/system/chromeos/network/vpn_list_view.cc |
| +++ b/ash/common/system/chromeos/network/vpn_list_view.cc |
| @@ -197,7 +197,8 @@ class VPNListNetworkEntry : public VPNListEntryBase, |
| VPNListEntryBase::VPNListEntryBase(VPNListView* parent) |
| : HoverHighlightView(parent) { |
| - SetBorder(views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 0)); |
| + if (!UseMd()) |
| + SetBorder(views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 0)); |
| } |
| VPNListNetworkEntry::VPNListNetworkEntry(VPNListView* parent, |
| @@ -285,24 +286,22 @@ void VPNListNetworkEntry::UpdateFromNetworkState( |
| IsConnectedOrConnecting(network)); |
| if (IsConnectedOrConnecting(network)) { |
| if (UseMd()) { |
| + DCHECK(tri_view()); |
|
bruthig
2016/11/24 22:36:29
nit: I believe the style guide says not to include
|
| disconnect_button_ = TrayPopupUtils::CreateTrayPopupButton( |
| this, l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_VPN_DISCONNECT)); |
| - } else { |
| - disconnect_button_ = new DisconnectButton(this); |
| - } |
| - if (UseMd()) { |
| - DCHECK(tri_view()); |
| tri_view()->AddView(TriView::Container::END, disconnect_button_); |
| tri_view()->SetContainerVisible(TriView::Container::END, true); |
| + tri_view()->SetContainerBorder( |
| + TriView::Container::END, |
| + views::CreateEmptyBorder(0, 0, 0, kTrayPopupButtonEndMargin)); |
| } else { |
| + disconnect_button_ = new DisconnectButton(this); |
| AddChildView(disconnect_button_); |
| + SetBorder(views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 3)); |
| } |
| - |
| - SetBorder( |
| - views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, |
| - UseMd() ? kTrayPopupButtonEndMargin : 3)); |
| } else { |
| - SetBorder(views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 0)); |
| + if (!UseMd()) |
| + SetBorder(views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 0)); |
| } |
| if (!UseMd()) { |