summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkeybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-11 08:12:46 +0000
committerkeybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-11 08:12:46 +0000
commit728f28f2dfd7e22a414a8657229af008a19d7a9d (patch)
treef5457a015a217cc263de495926fec0130d49ef5d
parent9440c7840c5a51964a6e8d7d7f630982057759ea (diff)
downloadchromium_src-728f28f2dfd7e22a414a8657229af008a19d7a9d.zip
chromium_src-728f28f2dfd7e22a414a8657229af008a19d7a9d.tar.gz
chromium_src-728f28f2dfd7e22a414a8657229af008a19d7a9d.tar.bz2
Bluetooth: rename Release to avoid RefCounted conflict
Release is a bad name for Delegate methods because it prevents the delegate from implementing base::RefCounted, or results in spurious calls; rename to Released. BUG= Review URL: https://codereview.chromium.org/234513002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263191 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chromeos/dbus/bluetooth_agent_service_provider.cc2
-rw-r--r--chromeos/dbus/bluetooth_agent_service_provider.h6
-rw-r--r--chromeos/dbus/bluetooth_profile_service_provider.cc2
-rw-r--r--chromeos/dbus/bluetooth_profile_service_provider.h6
-rw-r--r--chromeos/dbus/fake_bluetooth_agent_service_provider.cc2
-rw-r--r--chromeos/dbus/fake_bluetooth_profile_service_provider.cc2
-rw-r--r--device/bluetooth/bluetooth_adapter_chromeos.cc2
-rw-r--r--device/bluetooth/bluetooth_adapter_chromeos.h2
-rw-r--r--device/bluetooth/bluetooth_profile_chromeos.cc2
-rw-r--r--device/bluetooth/bluetooth_profile_chromeos.h2
10 files changed, 16 insertions, 12 deletions
diff --git a/chromeos/dbus/bluetooth_agent_service_provider.cc b/chromeos/dbus/bluetooth_agent_service_provider.cc
index 25e07fe..63e6d77 100644
--- a/chromeos/dbus/bluetooth_agent_service_provider.cc
+++ b/chromeos/dbus/bluetooth_agent_service_provider.cc
@@ -129,7 +129,7 @@ class BluetoothAgentServiceProviderImpl
DCHECK(OnOriginThread());
DCHECK(delegate_);
- delegate_->Release();
+ delegate_->Released();
response_sender.Run(dbus::Response::FromMethodCall(method_call));
}
diff --git a/chromeos/dbus/bluetooth_agent_service_provider.h b/chromeos/dbus/bluetooth_agent_service_provider.h
index 3cef4d6..411cc1d 100644
--- a/chromeos/dbus/bluetooth_agent_service_provider.h
+++ b/chromeos/dbus/bluetooth_agent_service_provider.h
@@ -64,8 +64,10 @@ class CHROMEOS_EXPORT BluetoothAgentServiceProvider {
// This method will be called when the agent is unregistered from the
// Bluetooth daemon, generally at the end of a pairing request. It may be
- // used to perform cleanup tasks.
- virtual void Release() = 0;
+ // used to perform cleanup tasks. This corresponds to the
+ // org.bluez.Agent1.Release method and is renamed to avoid a conflict
+ // with base::Refcounted<T>.
+ virtual void Released() = 0;
// This method will be called when the Bluetooth daemon requires a
// PIN Code for authentication of the device with object path |device_path|,
diff --git a/chromeos/dbus/bluetooth_profile_service_provider.cc b/chromeos/dbus/bluetooth_profile_service_provider.cc
index a465873..e30fada 100644
--- a/chromeos/dbus/bluetooth_profile_service_provider.cc
+++ b/chromeos/dbus/bluetooth_profile_service_provider.cc
@@ -89,7 +89,7 @@ class BluetoothProfileServiceProviderImpl
DCHECK(OnOriginThread());
DCHECK(delegate_);
- delegate_->Release();
+ delegate_->Released();
response_sender.Run(dbus::Response::FromMethodCall(method_call));
}
diff --git a/chromeos/dbus/bluetooth_profile_service_provider.h b/chromeos/dbus/bluetooth_profile_service_provider.h
index ee942cf..de77b5d 100644
--- a/chromeos/dbus/bluetooth_profile_service_provider.h
+++ b/chromeos/dbus/bluetooth_profile_service_provider.h
@@ -65,8 +65,10 @@ class CHROMEOS_EXPORT BluetoothProfileServiceProvider {
// This method will be called when the profile is unregistered from the
// Bluetooth daemon, generally at shutdown or at the applications' request.
- // It may be used to perform cleanup tasks.
- virtual void Release() = 0;
+ // It may be used to perform cleanup tasks. This corresponds to the
+ // org.bluez.Profile1.Release method and is renamed to avoid a conflict
+ // with base::Refcounted<T>.
+ virtual void Released() = 0;
// This method will be called when a profile connection to the device
// with object path |device_path| is established. |callback| must be called
diff --git a/chromeos/dbus/fake_bluetooth_agent_service_provider.cc b/chromeos/dbus/fake_bluetooth_agent_service_provider.cc
index 3948c3c..cd3207a 100644
--- a/chromeos/dbus/fake_bluetooth_agent_service_provider.cc
+++ b/chromeos/dbus/fake_bluetooth_agent_service_provider.cc
@@ -34,7 +34,7 @@ FakeBluetoothAgentServiceProvider::~FakeBluetoothAgentServiceProvider() {
void FakeBluetoothAgentServiceProvider::Release() {
VLOG(1) << object_path_.value() << ": Release";
- delegate_->Release();
+ delegate_->Released();
}
void FakeBluetoothAgentServiceProvider::RequestPinCode(
diff --git a/chromeos/dbus/fake_bluetooth_profile_service_provider.cc b/chromeos/dbus/fake_bluetooth_profile_service_provider.cc
index d07e825..e16fa46 100644
--- a/chromeos/dbus/fake_bluetooth_profile_service_provider.cc
+++ b/chromeos/dbus/fake_bluetooth_profile_service_provider.cc
@@ -34,7 +34,7 @@ FakeBluetoothProfileServiceProvider::~FakeBluetoothProfileServiceProvider() {
void FakeBluetoothProfileServiceProvider::Release() {
VLOG(1) << object_path_.value() << ": Release";
- delegate_->Release();
+ delegate_->Released();
}
void FakeBluetoothProfileServiceProvider::NewConnection(
diff --git a/device/bluetooth/bluetooth_adapter_chromeos.cc b/device/bluetooth/bluetooth_adapter_chromeos.cc
index 820972e..2be5528 100644
--- a/device/bluetooth/bluetooth_adapter_chromeos.cc
+++ b/device/bluetooth/bluetooth_adapter_chromeos.cc
@@ -342,7 +342,7 @@ void BluetoothAdapterChromeOS::InputPropertyChanged(
NotifyDeviceChanged(device_chromeos);
}
-void BluetoothAdapterChromeOS::Release() {
+void BluetoothAdapterChromeOS::Released() {
DCHECK(agent_.get());
VLOG(1) << "Release";
diff --git a/device/bluetooth/bluetooth_adapter_chromeos.h b/device/bluetooth/bluetooth_adapter_chromeos.h
index f1199c5..8e10c6f 100644
--- a/device/bluetooth/bluetooth_adapter_chromeos.h
+++ b/device/bluetooth/bluetooth_adapter_chromeos.h
@@ -105,7 +105,7 @@ class BluetoothAdapterChromeOS
const std::string& property_name) OVERRIDE;
// BluetoothAgentServiceProvider::Delegate override.
- virtual void Release() OVERRIDE;
+ virtual void Released() OVERRIDE;
virtual void RequestPinCode(const dbus::ObjectPath& device_path,
const PinCodeCallback& callback) OVERRIDE;
virtual void DisplayPinCode(const dbus::ObjectPath& device_path,
diff --git a/device/bluetooth/bluetooth_profile_chromeos.cc b/device/bluetooth/bluetooth_profile_chromeos.cc
index 7d6b786f..2b6e91f 100644
--- a/device/bluetooth/bluetooth_profile_chromeos.cc
+++ b/device/bluetooth/bluetooth_profile_chromeos.cc
@@ -172,7 +172,7 @@ void BluetoothProfileChromeOS::OnGetAdapter(
callback));
}
-void BluetoothProfileChromeOS::Release() {
+void BluetoothProfileChromeOS::Released() {
VLOG(1) << object_path_.value() << ": Release";
}
diff --git a/device/bluetooth/bluetooth_profile_chromeos.h b/device/bluetooth/bluetooth_profile_chromeos.h
index 24e6c37..fd3ad19 100644
--- a/device/bluetooth/bluetooth_profile_chromeos.h
+++ b/device/bluetooth/bluetooth_profile_chromeos.h
@@ -56,7 +56,7 @@ class CHROMEOS_EXPORT BluetoothProfileChromeOS
const ProfileCallback& callback);
// BluetoothProfileServiceProvider::Delegate override.
- virtual void Release() OVERRIDE;
+ virtual void Released() OVERRIDE;
virtual void NewConnection(
const dbus::ObjectPath& device_path,
scoped_ptr<dbus::FileDescriptor> fd,