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

Side by Side Diff: components/pairing/bluetooth_controller_pairing_controller.cc

Issue 1921923002: Convert //components/[o-t]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/pairing/bluetooth_controller_pairing_controller.h" 5 #include "components/pairing/bluetooth_controller_pairing_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 adapter_->SetPowered( 125 adapter_->SetPowered(
126 true, 126 true,
127 base::Bind(&BluetoothControllerPairingController::OnSetPowered, 127 base::Bind(&BluetoothControllerPairingController::OnSetPowered,
128 ptr_factory_.GetWeakPtr()), 128 ptr_factory_.GetWeakPtr()),
129 base::Bind(&BluetoothControllerPairingController::OnError, 129 base::Bind(&BluetoothControllerPairingController::OnError,
130 ptr_factory_.GetWeakPtr())); 130 ptr_factory_.GetWeakPtr()));
131 } 131 }
132 } 132 }
133 133
134 void BluetoothControllerPairingController::OnStartDiscoverySession( 134 void BluetoothControllerPairingController::OnStartDiscoverySession(
135 scoped_ptr<device::BluetoothDiscoverySession> discovery_session) { 135 std::unique_ptr<device::BluetoothDiscoverySession> discovery_session) {
136 DCHECK(thread_checker_.CalledOnValidThread()); 136 DCHECK(thread_checker_.CalledOnValidThread());
137 discovery_session_ = std::move(discovery_session); 137 discovery_session_ = std::move(discovery_session);
138 ChangeStage(STAGE_DEVICES_DISCOVERY); 138 ChangeStage(STAGE_DEVICES_DISCOVERY);
139 139
140 for (const auto& device : adapter_->GetDevices()) 140 for (const auto& device : adapter_->GetDevices())
141 DeviceFound(device); 141 DeviceFound(device);
142 } 142 }
143 143
144 void BluetoothControllerPairingController::OnConnect() { 144 void BluetoothControllerPairingController::OnConnect() {
145 DCHECK(thread_checker_.CalledOnValidThread()); 145 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 ChangeStage(STAGE_WAITING_FOR_CODE_CONFIRMATION); 499 ChangeStage(STAGE_WAITING_FOR_CODE_CONFIRMATION);
500 } 500 }
501 501
502 void BluetoothControllerPairingController::AuthorizePairing( 502 void BluetoothControllerPairingController::AuthorizePairing(
503 device::BluetoothDevice* device) { 503 device::BluetoothDevice* device) {
504 // Disallow unknown device. 504 // Disallow unknown device.
505 device->RejectPairing(); 505 device->RejectPairing();
506 } 506 }
507 507
508 } // namespace pairing_chromeos 508 } // namespace pairing_chromeos
OLDNEW
« no previous file with comments | « components/pairing/bluetooth_controller_pairing_controller.h ('k') | components/pairing/bluetooth_host_pairing_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698