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

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

Issue 811623002: Add logging for slow device events, limit network UI update rate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@patch_441650
Patch Set: Feedback Created 6 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
« no previous file with comments | « ash/system/chromeos/network/tray_vpn.h ('k') | chromeos/device_event_log.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/network/tray_vpn.cc
diff --git a/ash/system/chromeos/network/tray_vpn.cc b/ash/system/chromeos/network/tray_vpn.cc
index 545a5bae618db0e67d4be59fcff83b2a3a50b3de..0d4cbeabc53090fb37f4679f01751625c556e2c2 100644
--- a/ash/system/chromeos/network/tray_vpn.cc
+++ b/ash/system/chromeos/network/tray_vpn.cc
@@ -13,6 +13,7 @@
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_item_more.h"
#include "ash/system/tray/tray_popup_label_button.h"
+#include "chromeos/device_event_log.h"
#include "chromeos/network/network_state.h"
#include "chromeos/network/network_state_handler.h"
#include "grit/ash_strings.h"
@@ -38,7 +39,7 @@ class VpnDefaultView : public TrayItemMore,
Update();
}
- virtual ~VpnDefaultView() {
+ ~VpnDefaultView() override {
ui::network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this);
}
@@ -67,9 +68,7 @@ class VpnDefaultView : public TrayItemMore,
}
// ui::network_icon::AnimationObserver
- virtual void NetworkIconChanged() override {
- Update();
- }
+ void NetworkIconChanged() override { Update(); }
private:
void GetNetworkStateHandlerImageAndLabel(gfx::ImageSkia* image,
@@ -83,8 +82,8 @@ class VpnDefaultView : public TrayItemMore,
*image = ui::network_icon::GetImageForDisconnectedNetwork(
ui::network_icon::ICON_TYPE_DEFAULT_VIEW, shill::kTypeVPN);
if (label) {
- *label = l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_VPN_DISCONNECTED);
+ *label =
+ l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_VPN_DISCONNECTED);
}
*animating = false;
return;
@@ -104,9 +103,7 @@ class VpnDefaultView : public TrayItemMore,
} // namespace tray
TrayVPN::TrayVPN(SystemTray* system_tray)
- : SystemTrayItem(system_tray),
- default_(NULL),
- detailed_(NULL) {
+ : SystemTrayItem(system_tray), default_(NULL), detailed_(NULL) {
network_state_observer_.reset(new TrayNetworkStateObserver(this));
}
@@ -166,20 +163,11 @@ void TrayVPN::UpdateAfterLoginStatusChange(user::LoginStatus status) {
void TrayVPN::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
}
-void TrayVPN::NetworkStateChanged(bool list_changed) {
+void TrayVPN::NetworkStateChanged() {
if (default_)
default_->Update();
- if (detailed_) {
- if (list_changed)
- detailed_->NetworkListChanged();
- else
- detailed_->ManagerChanged();
- }
-}
-
-void TrayVPN::NetworkServiceChanged(const chromeos::NetworkState* network) {
if (detailed_)
- detailed_->NetworkServiceChanged(network);
+ detailed_->Update();
}
} // namespace ash
« no previous file with comments | « ash/system/chromeos/network/tray_vpn.h ('k') | chromeos/device_event_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698