Index: chromeos/dbus/experimental_bluetooth_profile_service_provider.h |
diff --git a/chromeos/dbus/experimental_bluetooth_profile_service_provider.h b/chromeos/dbus/experimental_bluetooth_profile_service_provider.h |
index 71e09d5771b11e34591873e5e1554dfc00f413b0..d22228e75f1dae5e99d7e25275a2d1254b06ec42 100644 |
--- a/chromeos/dbus/experimental_bluetooth_profile_service_provider.h |
+++ b/chromeos/dbus/experimental_bluetooth_profile_service_provider.h |
@@ -74,11 +74,15 @@ class CHROMEOS_EXPORT ExperimentalBluetoothProfileServiceProvider { |
// |
// A file descriptor for the connection socket is provided in |fd|, and |
// details about the specific implementation of the profile in |options|. |
- // The delegate should take the value and ownership |
- |
- // The file descriptor is owned by the delegate after this call so must be |
- // cleaned up if the connection is cancelled or rejected, the |options| |
- // structure is not so information out of it must be copied if required. |
+ // |
+ // IMPORTANT: Ownership of the file descriptor object |fd| is passed to |
+ // the delegate by this call, so it must be deleted in all code paths |
+ // including successful connnection or if the connection is cancelled or |
+ // rejected. The delegate is responsible for checking the validity of |fd| |
+ // on a thread where I/O is permitted before taking the value. |
+ // |
+ // Ownership of |options| is NOT passed so information out of it must be |
+ // copied if required. |
virtual void NewConnection(const dbus::ObjectPath& device_path, |
dbus::FileDescriptor* fd, |
const Options& options, |