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

Unified Diff: chrome/browser/devtools/device/port_forwarding_controller.cc

Issue 2442953002: Remove stl_util's deletion function use from chrome/. (Closed)
Patch Set: fix Created 4 years, 2 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
Index: chrome/browser/devtools/device/port_forwarding_controller.cc
diff --git a/chrome/browser/devtools/device/port_forwarding_controller.cc b/chrome/browser/devtools/device/port_forwarding_controller.cc
index 19ca9cd88bb53b5d9e5860c88929b6ae36c5b289..315aa5858e2b82e337cc88408d7c2392d54d3565 100644
--- a/chrome/browser/devtools/device/port_forwarding_controller.cc
+++ b/chrome/browser/devtools/device/port_forwarding_controller.cc
@@ -467,9 +467,9 @@ PortForwardingController::DeviceListChanged(
}
void PortForwardingController::CloseAllConnections() {
- std::vector<Connection*> registry_copy;
Registry copy(registry_);
- base::STLDeleteValues(&copy);
+ for (auto& entry : copy)
+ delete entry.second;
Nico 2016/10/24 18:41:01 I don't understand why this is better than the lhs
Avi (use Gerrit) 2016/10/24 19:15:37 The existence of STLDelete* functions encourages p
Nico 2016/10/24 19:18:26 That's a good motivation, thanks.
}
void PortForwardingController::OnPrefsChange() {

Powered by Google App Engine
This is Rietveld 408576698