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

Side by Side Diff: components/arc/bluetooth/arc_bluetooth_bridge.cc

Issue 1921973002: Convert //components/[a-e]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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 unified diff | Download patch
« no previous file with comments | « components/arc/bluetooth/arc_bluetooth_bridge.h ('k') | components/arc/ime/arc_ime_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/arc/bluetooth/arc_bluetooth_bridge.h" 5 #include "components/arc/bluetooth/arc_bluetooth_bridge.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <iomanip> 10 #include <iomanip>
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 void ArcBluetoothBridge::OnPoweredError( 353 void ArcBluetoothBridge::OnPoweredError(
354 const mojo::Callback<void(mojom::BluetoothAdapterState)>& callback) const { 354 const mojo::Callback<void(mojom::BluetoothAdapterState)>& callback) const {
355 LOG(WARNING) << "failed to change power state"; 355 LOG(WARNING) << "failed to change power state";
356 356
357 callback.Run(bluetooth_adapter_->IsPowered() 357 callback.Run(bluetooth_adapter_->IsPowered()
358 ? mojom::BluetoothAdapterState::ON 358 ? mojom::BluetoothAdapterState::ON
359 : mojom::BluetoothAdapterState::OFF); 359 : mojom::BluetoothAdapterState::OFF);
360 } 360 }
361 361
362 void ArcBluetoothBridge::OnDiscoveryStarted( 362 void ArcBluetoothBridge::OnDiscoveryStarted(
363 scoped_ptr<BluetoothDiscoverySession> session) { 363 std::unique_ptr<BluetoothDiscoverySession> session) {
364 if (!HasBluetoothInstance()) 364 if (!HasBluetoothInstance())
365 return; 365 return;
366 366
367 discovery_session_ = std::move(session); 367 discovery_session_ = std::move(session);
368 368
369 arc_bridge_service()->bluetooth_instance()->OnDiscoveryStateChanged( 369 arc_bridge_service()->bluetooth_instance()->OnDiscoveryStateChanged(
370 mojom::BluetoothDiscoveryState::STARTED); 370 mojom::BluetoothDiscoveryState::STARTED);
371 371
372 SendCachedDevicesFound(); 372 SendCachedDevicesFound();
373 } 373 }
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 // to 708 // to
709 // make sure the bond state machine on Android is ready to take the 709 // make sure the bond state machine on Android is ready to take the
710 // pair-done event. Otherwise the pair-done event will be dropped as an 710 // pair-done event. Otherwise the pair-done event will be dropped as an
711 // invalid change of paired status. 711 // invalid change of paired status.
712 OnPairing(addr->Clone()); 712 OnPairing(addr->Clone());
713 OnPairedDone(std::move(addr)); 713 OnPairedDone(std::move(addr));
714 } 714 }
715 } 715 }
716 716
717 } // namespace arc 717 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/bluetooth/arc_bluetooth_bridge.h ('k') | components/arc/ime/arc_ime_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698