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

Unified Diff: ash/common/system/chromeos/network/tray_vpn.cc

Issue 2522613004: Revert of chromeos: Convert ash VPNDelegate interface to mojo (Closed)
Patch Set: Created 4 years, 1 month 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 | « ash/common/mojo_interface_factory.cc ('k') | ash/common/system/chromeos/network/vpn_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/network/tray_vpn.cc
diff --git a/ash/common/system/chromeos/network/tray_vpn.cc b/ash/common/system/chromeos/network/tray_vpn.cc
index 4a86129aadcc0da9029d3ab08f025bb1ebe5e60c..f4dbd3f0510e0edb5bdcbead41ff64204dfceb2c 100644
--- a/ash/common/system/chromeos/network/tray_vpn.cc
+++ b/ash/common/system/chromeos/network/tray_vpn.cc
@@ -10,7 +10,7 @@
#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_state_list_detailed_view.h"
-#include "ash/common/system/chromeos/network/vpn_list.h"
+#include "ash/common/system/chromeos/network/vpn_delegate.h"
#include "ash/common/system/tray/system_tray.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/tray/tray_constants.h"
@@ -45,9 +45,15 @@
}
static bool ShouldShow() {
+ VPNDelegate* vpn_delegate =
+ WmShell::Get()->system_tray_delegate()->GetVPNDelegate();
+ // Tests may not have a VPN delegate. They should not show the VPN entry.
+ if (!vpn_delegate)
+ return false;
+
// Show the VPN entry in the ash tray bubble if at least one third-party VPN
// provider is installed.
- if (WmShell::Get()->vpn_list()->HaveThirdPartyVPNProviders())
+ if (vpn_delegate->HaveThirdPartyVPNProviders())
return true;
// Also show the VPN entry if at least one VPN network is configured.
« no previous file with comments | « ash/common/mojo_interface_factory.cc ('k') | ash/common/system/chromeos/network/vpn_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698