summaryrefslogtreecommitdiffstats
path: root/components/pairing
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-09-15 14:12:41 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-15 21:15:27 +0000
commit8a861444c5870b42b12a6872009dd04811f404d2 (patch)
treec391be2508ce6567024c44aeea1f05aa2b1f5581 /components/pairing
parent7cfbf94b2614b6ec3c775fcfc3c56ccc7dc9f97c (diff)
downloadchromium_src-8a861444c5870b42b12a6872009dd04811f404d2.zip
chromium_src-8a861444c5870b42b12a6872009dd04811f404d2.tar.gz
chromium_src-8a861444c5870b42b12a6872009dd04811f404d2.tar.bz2
Remove implicit conversions from scoped_refptr to T* in components/pairing
This patch was generated by running the rewrite_scoped_refptr clang tool on a ChromeOS build. BUG=110610 Review URL: https://codereview.chromium.org/574513002 Cr-Commit-Position: refs/heads/master@{#294890}
Diffstat (limited to 'components/pairing')
-rw-r--r--components/pairing/bluetooth_controller_pairing_controller.cc6
-rw-r--r--components/pairing/bluetooth_host_pairing_controller.cc8
2 files changed, 7 insertions, 7 deletions
diff --git a/components/pairing/bluetooth_controller_pairing_controller.cc b/components/pairing/bluetooth_controller_pairing_controller.cc
index bb01dd7..cce1d67 100644
--- a/components/pairing/bluetooth_controller_pairing_controller.cc
+++ b/components/pairing/bluetooth_controller_pairing_controller.cc
@@ -56,12 +56,12 @@ void BluetoothControllerPairingController::Reset() {
controller_device_id_.clear();
discovery_session_.reset();
- if (socket_) {
+ if (socket_.get()) {
socket_->Close();
socket_ = NULL;
}
- if (adapter_) {
+ if (adapter_.get()) {
adapter_->RemoveObserver(this);
adapter_ = NULL;
}
@@ -104,7 +104,7 @@ void BluetoothControllerPairingController::OnSetPowered() {
void BluetoothControllerPairingController::OnGetAdapter(
scoped_refptr<device::BluetoothAdapter> adapter) {
DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(!adapter_);
+ DCHECK(!adapter_.get());
adapter_ = adapter;
adapter_->AddObserver(this);
diff --git a/components/pairing/bluetooth_host_pairing_controller.cc b/components/pairing/bluetooth_host_pairing_controller.cc
index a22dfc3..53a6187 100644
--- a/components/pairing/bluetooth_host_pairing_controller.cc
+++ b/components/pairing/bluetooth_host_pairing_controller.cc
@@ -66,7 +66,7 @@ void BluetoothHostPairingController::SendHostStatus() {
void BluetoothHostPairingController::AbortWithError(
int code,
const std::string& message) {
- if (controller_socket_) {
+ if (controller_socket_.get()) {
pairing_api::Error error;
error.set_api_version(kPairingAPIVersion);
@@ -88,12 +88,12 @@ void BluetoothHostPairingController::AbortWithError(
}
void BluetoothHostPairingController::Reset() {
- if (controller_socket_) {
+ if (controller_socket_.get()) {
controller_socket_->Close();
controller_socket_ = NULL;
}
- if (service_socket_) {
+ if (service_socket_.get()) {
service_socket_->Close();
service_socket_ = NULL;
}
@@ -103,7 +103,7 @@ void BluetoothHostPairingController::Reset() {
void BluetoothHostPairingController::OnGetAdapter(
scoped_refptr<device::BluetoothAdapter> adapter) {
DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(!adapter_);
+ DCHECK(!adapter_.get());
adapter_ = adapter;
// TODO(zork): Make the device name prettier. (http://crbug.com/405774)