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

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

Issue 400983004: ash: Fix a few leaks in the network list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/network/network_state_list_detailed_view.cc
diff --git a/ash/system/chromeos/network/network_state_list_detailed_view.cc b/ash/system/chromeos/network/network_state_list_detailed_view.cc
index b771e1924cd5b2274b46bb8df05ce164cda7672c..821d009ad4d1bd25645ed3003e2ddd8f95aae71f 100644
--- a/ash/system/chromeos/network/network_state_list_detailed_view.cc
+++ b/ash/system/chromeos/network/network_state_list_detailed_view.cc
@@ -515,6 +515,7 @@ void NetworkStateListDetailedView::UpdateNetworkList() {
remove_service_paths.insert(it->first);
network_map_.erase(it->second);
scroll_content()->RemoveChildView(it->second);
+ delete it->second;
needs_relayout = true;
}
}
@@ -624,6 +625,7 @@ bool NetworkStateListDetailedView::UpdateNetworkListEntries(
needs_relayout = true;
} else if (no_cellular_networks_view_) {
scroll_content()->RemoveChildView(no_cellular_networks_view_);
+ delete no_cellular_networks_view_;
no_cellular_networks_view_ = NULL;
needs_relayout = true;
}
@@ -638,6 +640,7 @@ bool NetworkStateListDetailedView::UpdateNetworkListEntries(
needs_relayout = true;
} else if (no_wifi_networks_view_) {
scroll_content()->RemoveChildView(no_wifi_networks_view_);
+ delete no_wifi_networks_view_;
no_wifi_networks_view_ = NULL;
needs_relayout = true;
}
@@ -650,6 +653,7 @@ bool NetworkStateListDetailedView::UpdateNetworkListEntries(
needs_relayout = true;
} else if (scanning_view_ != NULL) {
scroll_content()->RemoveChildView(scanning_view_);
+ delete scanning_view_;
scanning_view_ = NULL;
needs_relayout = true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698