summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/fake_debug_daemon_client.cc
diff options
context:
space:
mode:
authordhsharp <dhsharp@chromium.org>2015-09-08 12:06:48 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-08 19:07:28 +0000
commit2d8385a144c801b96b9338f89b1eb8fa8cbf5f6d (patch)
treefdf470379e6fad2d8d2e05fc8418b4454062577c /chromeos/dbus/fake_debug_daemon_client.cc
parentdfffbacbdd7196c880f7effb4a489e004c9a6dea (diff)
downloadchromium_src-2d8385a144c801b96b9338f89b1eb8fa8cbf5f6d.zip
chromium_src-2d8385a144c801b96b9338f89b1eb8fa8cbf5f6d.tar.gz
chromium_src-2d8385a144c801b96b9338f89b1eb8fa8cbf5f6d.tar.bz2
dbus/debugd: Add method for org.chromium.debugd.GetPerfOutput
This method will replace org.chromium.debug.GetRandomPerfOutput. Unfortunately, the C++ method name "GetPerfOutput" was used for the DBus method name "GetRandomPerfOutput", which means the most appropriate name is taken. Since the DBus method "GetPerfOutput" will soon be removed, I've overloaded the C++ method "GetPerfOutput" to call the DBus method "GetPerfOutput". The difference betweeen these two methods is that the new one takes a vector<string> containing the perf arguments to call, whereas the old one makes a random selection of perf arguments. The two methods have the same output type, and so share the OnGetPerfOutput callback, and the GetPerfOutputCallback type. Review URL: https://codereview.chromium.org/1332453002 Cr-Commit-Position: refs/heads/master@{#347759}
Diffstat (limited to 'chromeos/dbus/fake_debug_daemon_client.cc')
-rw-r--r--chromeos/dbus/fake_debug_daemon_client.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chromeos/dbus/fake_debug_daemon_client.cc b/chromeos/dbus/fake_debug_daemon_client.cc
index 2848e5b..56f0bb5 100644
--- a/chromeos/dbus/fake_debug_daemon_client.cc
+++ b/chromeos/dbus/fake_debug_daemon_client.cc
@@ -90,6 +90,17 @@ void FakeDebugDaemonClient::GetPerfOutput(
FROM_HERE, base::Bind(callback, status, perf_data, perf_stat));
}
+void FakeDebugDaemonClient::GetPerfOutput(
+ uint32_t duration,
+ const std::vector<std::string>& perf_args,
+ const GetPerfOutputCallback& callback) {
+ int status = 0;
+ std::vector<uint8> perf_data;
+ std::vector<uint8> perf_stat;
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(callback, status, perf_data, perf_stat));
+}
+
void FakeDebugDaemonClient::GetScrubbedLogs(const GetLogsCallback& callback) {
std::map<std::string, std::string> sample;
sample["Sample Scrubbed Log"] = "Your email address is xxxxxxxx";