| 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 9baee1e1f106c91da8aecd8eb65dcf4bdc8b05ab..19442ef7c58df384391b4d8a572d90210ccda02f 100644
|
| --- a/ash/common/system/chromeos/network/vpn_list_view.cc
|
| +++ b/ash/common/system/chromeos/network/vpn_list_view.cc
|
| @@ -14,10 +14,9 @@
|
| #include "ash/common/system/chromeos/network/network_icon_animation.h"
|
| #include "ash/common/system/chromeos/network/network_icon_animation_observer.h"
|
| #include "ash/common/system/chromeos/network/network_list_delegate.h"
|
| -#include "ash/common/system/chromeos/network/vpn_delegate.h"
|
| +#include "ash/common/system/chromeos/network/vpn_list.h"
|
| #include "ash/common/system/tray/hover_highlight_view.h"
|
| #include "ash/common/system/tray/system_menu_button.h"
|
| -#include "ash/common/system/tray/system_tray_delegate.h"
|
| #include "ash/common/system/tray/tray_constants.h"
|
| #include "ash/common/system/tray/tray_popup_label_button.h"
|
| #include "ash/common/system/tray/tray_popup_utils.h"
|
| @@ -305,18 +304,11 @@ void VPNListNetworkEntry::UpdateFromNetworkState(
|
| } // namespace
|
|
|
| VPNListView::VPNListView(NetworkListDelegate* delegate) : delegate_(delegate) {
|
| - WmShell::Get()->system_tray_delegate()->GetVPNDelegate()->AddObserver(this);
|
| + WmShell::Get()->vpn_list()->AddObserver(this);
|
| }
|
|
|
| VPNListView::~VPNListView() {
|
| - // We need the check as on shell destruction, the delegate is destroyed first.
|
| - SystemTrayDelegate* const system_tray_delegate =
|
| - WmShell::Get()->system_tray_delegate();
|
| - if (system_tray_delegate) {
|
| - VPNDelegate* const vpn_delegate = system_tray_delegate->GetVPNDelegate();
|
| - if (vpn_delegate)
|
| - vpn_delegate->RemoveObserver(this);
|
| - }
|
| + WmShell::Get()->vpn_list()->RemoveObserver(this);
|
| }
|
|
|
| void VPNListView::Update() {
|
| @@ -421,7 +413,7 @@ void VPNListView::OnViewClicked(views::View* sender) {
|
| WmShell::Get()->RecordUserMetricsAction(
|
| key.third_party ? UMA_STATUS_AREA_VPN_ADD_THIRD_PARTY_CLICKED
|
| : UMA_STATUS_AREA_VPN_ADD_BUILT_IN_CLICKED);
|
| - WmShell::Get()->system_tray_delegate()->GetVPNDelegate()->ShowAddPage(key);
|
| + WmShell::Get()->vpn_list()->ShowAddPage(key);
|
| return;
|
| }
|
|
|
| @@ -473,7 +465,7 @@ void VPNListView::AddProvidersAndNetworks(
|
| const chromeos::NetworkStateHandler::NetworkStateList& networks) {
|
| // Get the list of VPN providers enabled in the primary user's profile.
|
| std::vector<VPNProvider> providers =
|
| - WmShell::Get()->system_tray_delegate()->GetVPNDelegate()->vpn_providers();
|
| + WmShell::Get()->vpn_list()->vpn_providers();
|
|
|
| // Add providers with at least one configured network along with their
|
| // networks. Providers are added in the order of their highest priority
|
|
|