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

Unified Diff: device/usb/mojo/device_manager_impl.cc

Issue 1925463002: Mojo: Make device/ to not rely on connecton error notification on message loop destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « device/usb/mojo/device_manager_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/mojo/device_manager_impl.cc
diff --git a/device/usb/mojo/device_manager_impl.cc b/device/usb/mojo/device_manager_impl.cc
index 3836c9744b0aa73ba1573902ba3a6059bc400d6e..a498ff64321aa4a2075ed4e9d3fdfbd7ab3a5f68 100644
--- a/device/usb/mojo/device_manager_impl.cc
+++ b/device/usb/mojo/device_manager_impl.cc
@@ -47,8 +47,8 @@ DeviceManagerImpl::DeviceManagerImpl(
binding_(this, std::move(request)),
weak_factory_(this) {
// This object owns itself and will be destroyed if the message pipe it is
- // bound to is closed or the UsbService is shut down.
- binding_.set_connection_error_handler([this]() { delete this; });
+ // bound to is closed, the message loop is destructed, or the UsbService is
+ // shut down.
observer_.Add(usb_service_);
}
« no previous file with comments | « device/usb/mojo/device_manager_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698