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

Unified Diff: ash/common/system/tray/system_tray.cc

Issue 2565823002: Reland: Add test for system tray network menu icon for extension-controlled networks (Closed)
Patch Set: fix use-after-free Created 4 years 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: ash/common/system/tray/system_tray.cc
diff --git a/ash/common/system/tray/system_tray.cc b/ash/common/system/tray/system_tray.cc
index cb725a9d4b6603c4ed781c986ee97dd0e596ddcb..bf77079841f884a8a62c18b7cdb6fb077657de4d 100644
--- a/ash/common/system/tray/system_tray.cc
+++ b/ash/common/system/tray/system_tray.cc
@@ -216,6 +216,7 @@ SystemTray::SystemTray(WmShelf* wm_shelf)
tray_audio_(nullptr),
tray_cast_(nullptr),
tray_date_(nullptr),
+ tray_network_(nullptr),
tray_tiles_(nullptr),
tray_system_info_(nullptr),
tray_update_(nullptr),
@@ -290,7 +291,8 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
AddTrayItem(tray_accessibility_);
AddTrayItem(new TrayTracing(this));
AddTrayItem(new TrayPower(this, message_center::MessageCenter::Get()));
- AddTrayItem(new TrayNetwork(this));
+ tray_network_ = new TrayNetwork(this);
+ AddTrayItem(tray_network_);
AddTrayItem(new TrayVPN(this));
AddTrayItem(new TraySms(this));
AddTrayItem(new TrayBluetooth(this));
@@ -808,6 +810,10 @@ TrayDate* SystemTray::GetTrayDateForTesting() const {
return tray_date_;
}
+TrayNetwork* SystemTray::GetTrayNetworkForTesting() const {
+ return tray_network_;
+}
+
TraySystemInfo* SystemTray::GetTraySystemInfoForTesting() const {
return tray_system_info_;
}
« no previous file with comments | « ash/common/system/tray/system_tray.h ('k') | chrome/browser/ui/ash/networking_config_delegate_chromeos_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698