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

Side by Side Diff: chromeos/dbus/debug_daemon_client.cc

Issue 1556773002: Convert Pass()→std::move() in //chromeos (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 | « chromeos/dbus/dbus_thread_manager.cc ('k') | chromeos/dbus/permission_broker_client.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chromeos/dbus/debug_daemon_client.h" 5 #include "chromeos/dbus/debug_daemon_client.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <unistd.h> 10 #include <unistd.h>
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 if (!pipe_write_end.IsValid()) { 560 if (!pipe_write_end.IsValid()) {
561 LOG(ERROR) << "Cannot create pipe reader"; 561 LOG(ERROR) << "Cannot create pipe reader";
562 // NB: continue anyway to shutdown tracing; toss trace data 562 // NB: continue anyway to shutdown tracing; toss trace data
563 pipe_write_end.Initialize(base::FilePath(FILE_PATH_LITERAL("/dev/null")), 563 pipe_write_end.Initialize(base::FilePath(FILE_PATH_LITERAL("/dev/null")),
564 base::File::FLAG_OPEN | base::File::FLAG_WRITE); 564 base::File::FLAG_OPEN | base::File::FLAG_WRITE);
565 // TODO(sleffler) if this fails AppendFileDescriptor will abort 565 // TODO(sleffler) if this fails AppendFileDescriptor will abort
566 } 566 }
567 scoped_ptr<dbus::FileDescriptor> file_descriptor(new dbus::FileDescriptor); 567 scoped_ptr<dbus::FileDescriptor> file_descriptor(new dbus::FileDescriptor);
568 file_descriptor->PutValue(pipe_write_end.TakePlatformFile()); 568 file_descriptor->PutValue(pipe_write_end.TakePlatformFile());
569 file_descriptor->CheckValidity(); 569 file_descriptor->CheckValidity();
570 return file_descriptor.Pass(); 570 return file_descriptor;
571 } 571 }
572 572
573 // Called when a CheckValidity response is received. 573 // Called when a CheckValidity response is received.
574 void OnCreateFileDescriptorRequestStopSystem( 574 void OnCreateFileDescriptorRequestStopSystem(
575 const StopAgentTracingCallback& callback, 575 const StopAgentTracingCallback& callback,
576 scoped_ptr<dbus::FileDescriptor> file_descriptor) { 576 scoped_ptr<dbus::FileDescriptor> file_descriptor) {
577 DCHECK(file_descriptor); 577 DCHECK(file_descriptor);
578 578
579 // Issue the dbus request to stop system tracing 579 // Issue the dbus request to stop system tracing
580 dbus::MethodCall method_call( 580 dbus::MethodCall method_call(
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 DebugDaemonClient::EmptyStopAgentTracingCallback() { 641 DebugDaemonClient::EmptyStopAgentTracingCallback() {
642 return base::Bind(&EmptyStopAgentTracingCallbackBody); 642 return base::Bind(&EmptyStopAgentTracingCallbackBody);
643 } 643 }
644 644
645 // static 645 // static
646 DebugDaemonClient* DebugDaemonClient::Create() { 646 DebugDaemonClient* DebugDaemonClient::Create() {
647 return new DebugDaemonClientImpl(); 647 return new DebugDaemonClientImpl();
648 } 648 }
649 649
650 } // namespace chromeos 650 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/dbus_thread_manager.cc ('k') | chromeos/dbus/permission_broker_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698