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

Unified Diff: chromeos/dbus/fake_bluetooth_profile_service_provider.h

Issue 1124883004: Submission for C++ Readability (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert overrides Created 5 years, 6 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: chromeos/dbus/fake_bluetooth_profile_service_provider.h
diff --git a/chromeos/dbus/fake_bluetooth_profile_service_provider.h b/chromeos/dbus/fake_bluetooth_profile_service_provider.h
index 95a88c5c47f90f869d2f34533fb648e41fb84ae4..2c98048c5a9895d83bad733f3efe85921aa07595 100644
--- a/chromeos/dbus/fake_bluetooth_profile_service_provider.h
+++ b/chromeos/dbus/fake_bluetooth_profile_service_provider.h
@@ -18,28 +18,28 @@ namespace chromeos {
// FakeBluetoothProfileServiceProvider simulates the behavior of a local
// Bluetooth agent object and is used both in test cases in place of a
// mock and on the Linux desktop.
+//
+// This class is only called from the dbus origin thread and is not thread-safe.
class CHROMEOS_EXPORT FakeBluetoothProfileServiceProvider
: public BluetoothProfileServiceProvider {
public:
FakeBluetoothProfileServiceProvider(const dbus::ObjectPath& object_path,
- Delegate *delegate);
+ Delegate* delegate);
~FakeBluetoothProfileServiceProvider() override;
// Each of these calls the equivalent
// BluetoothProfileServiceProvider::Delegate method on the object passed on
// construction.
- virtual void Release();
- virtual void NewConnection(
- const dbus::ObjectPath& device_path,
- scoped_ptr<dbus::FileDescriptor> fd,
- const Delegate::Options& options,
- const Delegate::ConfirmationCallback& callback);
- virtual void RequestDisconnection(
- const dbus::ObjectPath& device_path,
- const Delegate::ConfirmationCallback& callback);
- virtual void Cancel();
-
- const dbus::ObjectPath& object_path() { return object_path_; }
+ void Released();
+ void NewConnection(const dbus::ObjectPath& device_path,
+ scoped_ptr<dbus::FileDescriptor> fd,
+ const Delegate::Options& options,
+ const Delegate::ConfirmationCallback& callback);
+ void RequestDisconnection(const dbus::ObjectPath& device_path,
+ const Delegate::ConfirmationCallback& callback);
+ void Cancel();
+
+ const dbus::ObjectPath& object_path() const { return object_path_; }
private:
friend class FakeBluetoothProfileManagerClient;
@@ -51,6 +51,8 @@ class CHROMEOS_EXPORT FakeBluetoothProfileServiceProvider
// passed to generate the reply. |delegate_| is generally the object that
// owns this one, and must outlive it.
Delegate* delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(FakeBluetoothProfileServiceProvider);
};
} // namespace chromeos
« no previous file with comments | « chromeos/dbus/fake_bluetooth_profile_manager_client.cc ('k') | chromeos/dbus/fake_bluetooth_profile_service_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698