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

Unified Diff: chromeos/dbus/experimental_bluetooth_profile_service_provider.h

Issue 14487002: Bluetooth: Profile support for Chrome OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add unit tests, and class comments Created 7 years, 7 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 | chromeos/dbus/experimental_bluetooth_profile_service_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..464969677a79c0eb27f89ed160c77acf617bce56 100644
--- a/chromeos/dbus/experimental_bluetooth_profile_service_provider.h
+++ b/chromeos/dbus/experimental_bluetooth_profile_service_provider.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/callback.h"
+#include "base/memory/scoped_ptr.h"
#include "chromeos/chromeos_export.h"
#include "dbus/bus.h"
#include "dbus/file_descriptor.h"
@@ -74,13 +75,16 @@ 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. The delegate is responsible for checking the
+ // validity of |fd| on a thread where I/O is permitted before taking the
+ // value. If the value is not taken, the file descriptor is closed.
+ //
+ // 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,
+ scoped_ptr<dbus::FileDescriptor> fd,
const Options& options,
const ConfirmationCallback& callback) = 0;
« no previous file with comments | « no previous file | chromeos/dbus/experimental_bluetooth_profile_service_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698