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

Unified Diff: chromeos/dbus/debug_daemon_client.h

Issue 2081153002: No dbus::FileDescriptor in DebugDaemonClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/metrics/perf/perf_output.cc ('k') | chromeos/dbus/debug_daemon_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/debug_daemon_client.h
diff --git a/chromeos/dbus/debug_daemon_client.h b/chromeos/dbus/debug_daemon_client.h
index 803500d489e26504c2bc678e1b8f87be98bc084a..20d2ae331443d763b0f8a4f5a0d20c7d64679c3d 100644
--- a/chromeos/dbus/debug_daemon_client.h
+++ b/chromeos/dbus/debug_daemon_client.h
@@ -17,7 +17,6 @@
#include "base/trace_event/tracing_agent.h"
#include "chromeos/chromeos_export.h"
#include "chromeos/dbus/dbus_client.h"
-#include "dbus/file_descriptor.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
namespace chromeos {
@@ -33,12 +32,13 @@ class CHROMEOS_EXPORT DebugDaemonClient
// - succeeded: was the logs stored successfully.
typedef base::Callback<void(bool succeeded)> GetDebugLogsCallback;
- // Requests to store debug logs into |file| and calls |callback|
+ // Requests to store debug logs into |file_descriptor| and calls |callback|
// when completed. Debug logs will be stored in the .tgz if
// |is_compressed| is true, otherwise in logs will be stored in .tar format.
+ // This method duplicates |file_descriptor| so it's OK to close the FD without
+ // waiting for the result.
virtual void DumpDebugLogs(bool is_compressed,
- base::File file,
- scoped_refptr<base::TaskRunner> task_runner,
+ int file_descriptor,
const GetDebugLogsCallback& callback) = 0;
// Called once SetDebugMode() is complete. Takes one parameter:
@@ -98,11 +98,13 @@ class CHROMEOS_EXPORT DebugDaemonClient
// seconds) and returns data collected over the passed |file_descriptor|.
// |error_callback| is called if there is an error with the DBus call.
// Note that quipper failures may occur after successfully running the DBus
- // method. Such errors can be detected by |file_descriptor| being closed with
- // no data written.
+ // method. Such errors can be detected by |file_descriptor| and all its
+ // duplicates being closed with no data written.
+ // This method duplicates |file_descriptor| so it's OK to close the FD without
+ // waiting for the result.
virtual void GetPerfOutput(base::TimeDelta duration,
const std::vector<std::string>& perf_args,
- dbus::ScopedFileDescriptor file_descriptor,
+ int file_descriptor,
const DBusMethodErrorCallback& error_callback) = 0;
// Callback type for GetScrubbedLogs(), GetAllLogs() or GetUserLogFiles().
« no previous file with comments | « chrome/browser/metrics/perf/perf_output.cc ('k') | chromeos/dbus/debug_daemon_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698