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

Side by Side Diff: device/hid/hid_service_linux.cc

Issue 1552863003: Global conversion of Pass()→std::move(): CrOS edition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « crypto/nss_util.cc ('k') | net/cert/nss_cert_database_chromeos.cc » ('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 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 "device/hid/hid_service_linux.h" 5 #include "device/hid/hid_service_linux.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 265
266 // static 266 // static
267 void HidServiceLinux::ValidateFdOnBlockingThread( 267 void HidServiceLinux::ValidateFdOnBlockingThread(
268 scoped_ptr<ConnectParams> params, 268 scoped_ptr<ConnectParams> params,
269 dbus::FileDescriptor fd) { 269 dbus::FileDescriptor fd) {
270 base::ThreadRestrictions::AssertIOAllowed(); 270 base::ThreadRestrictions::AssertIOAllowed();
271 271
272 fd.CheckValidity(); 272 fd.CheckValidity();
273 if (fd.is_valid()) { 273 if (fd.is_valid()) {
274 params->device_file = base::File(fd.TakeValue()); 274 params->device_file = base::File(fd.TakeValue());
275 FinishOpen(params.Pass()); 275 FinishOpen(std::move(params));
276 } else { 276 } else {
277 HID_LOG(EVENT) << "Permission broker denied access to '" 277 HID_LOG(EVENT) << "Permission broker denied access to '"
278 << params->device_info->device_node() << "'."; 278 << params->device_info->device_node() << "'.";
279 params->task_runner->PostTask(FROM_HERE, 279 params->task_runner->PostTask(FROM_HERE,
280 base::Bind(params->callback, nullptr)); 280 base::Bind(params->callback, nullptr));
281 } 281 }
282 } 282 }
283 283
284 #else 284 #else
285 285
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 // static 335 // static
336 void HidServiceLinux::CreateConnection(scoped_ptr<ConnectParams> params) { 336 void HidServiceLinux::CreateConnection(scoped_ptr<ConnectParams> params) {
337 DCHECK(params->device_file.IsValid()); 337 DCHECK(params->device_file.IsValid());
338 params->callback.Run(make_scoped_refptr(new HidConnectionLinux( 338 params->callback.Run(make_scoped_refptr(new HidConnectionLinux(
339 params->device_info, std::move(params->device_file), 339 params->device_info, std::move(params->device_file),
340 params->file_task_runner))); 340 params->file_task_runner)));
341 } 341 }
342 342
343 } // namespace device 343 } // namespace device
OLDNEW
« no previous file with comments | « crypto/nss_util.cc ('k') | net/cert/nss_cert_database_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698