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

Side by Side Diff: device/bluetooth/dbus/bluetooth_profile_service_provider.cc

Issue 1544323002: Convert Pass()→std::move() in //device (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "device/bluetooth/dbus/bluetooth_profile_service_provider.h" 5 #include "device/bluetooth/dbus/bluetooth_profile_service_provider.h"
6 6
7 #include <utility>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/logging.h" 10 #include "base/logging.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
11 #include "base/threading/platform_thread.h" 13 #include "base/threading/platform_thread.h"
12 #include "dbus/exported_object.h" 14 #include "dbus/exported_object.h"
13 #include "dbus/message.h" 15 #include "dbus/message.h"
14 #include "device/bluetooth/dbus/bluez_dbus_manager.h" 16 #include "device/bluetooth/dbus/bluez_dbus_manager.h"
15 #include "device/bluetooth/dbus/fake_bluetooth_profile_service_provider.h" 17 #include "device/bluetooth/dbus/fake_bluetooth_profile_service_provider.h"
16 #include "third_party/cros_system_api/dbus/service_constants.h" 18 #include "third_party/cros_system_api/dbus/service_constants.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 dict_entry_reader.PopVariantOfUint16(&options.version); 125 dict_entry_reader.PopVariantOfUint16(&options.version);
124 else if (key == bluetooth_profile::kFeaturesProperty) 126 else if (key == bluetooth_profile::kFeaturesProperty)
125 dict_entry_reader.PopVariantOfUint16(&options.features); 127 dict_entry_reader.PopVariantOfUint16(&options.features);
126 } 128 }
127 } 129 }
128 130
129 Delegate::ConfirmationCallback callback = base::Bind( 131 Delegate::ConfirmationCallback callback = base::Bind(
130 &BluetoothProfileServiceProviderImpl::OnConfirmation, 132 &BluetoothProfileServiceProviderImpl::OnConfirmation,
131 weak_ptr_factory_.GetWeakPtr(), method_call, response_sender); 133 weak_ptr_factory_.GetWeakPtr(), method_call, response_sender);
132 134
133 delegate_->NewConnection(device_path, fd.Pass(), options, callback); 135 delegate_->NewConnection(device_path, std::move(fd), options, callback);
134 } 136 }
135 137
136 // Called by dbus:: when the Bluetooth daemon is about to disconnect the 138 // Called by dbus:: when the Bluetooth daemon is about to disconnect the
137 // profile. 139 // profile.
138 void RequestDisconnection( 140 void RequestDisconnection(
139 dbus::MethodCall* method_call, 141 dbus::MethodCall* method_call,
140 dbus::ExportedObject::ResponseSender response_sender) { 142 dbus::ExportedObject::ResponseSender response_sender) {
141 DCHECK(OnOriginThread()); 143 DCHECK(OnOriginThread());
142 DCHECK(delegate_); 144 DCHECK(delegate_);
143 145
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 const dbus::ObjectPath& object_path, 242 const dbus::ObjectPath& object_path,
241 Delegate* delegate) { 243 Delegate* delegate) {
242 if (!bluez::BluezDBusManager::Get()->IsUsingStub()) { 244 if (!bluez::BluezDBusManager::Get()->IsUsingStub()) {
243 return new BluetoothProfileServiceProviderImpl(bus, object_path, delegate); 245 return new BluetoothProfileServiceProviderImpl(bus, object_path, delegate);
244 } else { 246 } else {
245 return new FakeBluetoothProfileServiceProvider(object_path, delegate); 247 return new FakeBluetoothProfileServiceProvider(object_path, delegate);
246 } 248 }
247 } 249 }
248 250
249 } // namespace bluez 251 } // namespace bluez
OLDNEW
« no previous file with comments | « device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.cc ('k') | device/bluetooth/dbus/bluez_dbus_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698