summaryrefslogtreecommitdiffstats
path: root/chromeos
diff options
context:
space:
mode:
authordhsharp <dhsharp@chromium.org>2015-09-03 10:51:05 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-03 17:51:42 +0000
commita90ed027dc3229751993fd84549b600be2ccc2a3 (patch)
treed52bc8fe9232ffb59e4abc1d66b7888a1973fad0 /chromeos
parent287b26ee900c1fe2079fef26b762604876f214d9 (diff)
downloadchromium_src-a90ed027dc3229751993fd84549b600be2ccc2a3.zip
chromium_src-a90ed027dc3229751993fd84549b600be2ccc2a3.tar.gz
chromium_src-a90ed027dc3229751993fd84549b600be2ccc2a3.tar.bz2
dbus/debugd: Remove GetPerfData
This DBus call is no longer used, replaced by GetRandomPerfOutput, which is furthermore soon to be replaced GetPerfOutput. Review URL: https://codereview.chromium.org/1308943007 Cr-Commit-Position: refs/heads/master@{#347179}
Diffstat (limited to 'chromeos')
-rw-r--r--chromeos/dbus/debug_daemon_client.cc35
-rw-r--r--chromeos/dbus/debug_daemon_client.h11
-rw-r--r--chromeos/dbus/fake_debug_daemon_client.cc7
-rw-r--r--chromeos/dbus/fake_debug_daemon_client.h2
4 files changed, 0 insertions, 55 deletions
diff --git a/chromeos/dbus/debug_daemon_client.cc b/chromeos/dbus/debug_daemon_client.cc
index 9a993b3..9054326 100644
--- a/chromeos/dbus/debug_daemon_client.cc
+++ b/chromeos/dbus/debug_daemon_client.cc
@@ -146,21 +146,6 @@ class DebugDaemonClientImpl : public DebugDaemonClient {
callback));
}
- void GetPerfData(uint32_t duration,
- const GetPerfDataCallback& callback) override {
- dbus::MethodCall method_call(debugd::kDebugdInterface,
- debugd::kGetRichPerfData);
- dbus::MessageWriter writer(&method_call);
- writer.AppendUint32(duration);
-
- debugdaemon_proxy_->CallMethod(
- &method_call,
- dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
- base::Bind(&DebugDaemonClientImpl::OnGetPerfData,
- weak_ptr_factory_.GetWeakPtr(),
- callback));
- }
-
void GetPerfOutput(uint32_t duration,
const GetPerfOutputCallback& callback) override {
dbus::MethodCall method_call(debugd::kDebugdInterface,
@@ -454,26 +439,6 @@ class DebugDaemonClientImpl : public DebugDaemonClient {
callback.Run(false, "");
}
- void OnGetPerfData(const GetPerfDataCallback& callback,
- dbus::Response* response) {
- std::vector<uint8> data;
-
- if (!response) {
- return;
- }
-
- dbus::MessageReader reader(response);
- const uint8* buffer = NULL;
- size_t buf_size = 0;
- if (!reader.PopArrayOfBytes(&buffer, &buf_size))
- return;
-
- // TODO(asharif): Figure out a way to avoid this copy.
- data.insert(data.end(), buffer, buffer + buf_size);
-
- callback.Run(data);
- }
-
void OnGetPerfOutput(const GetPerfOutputCallback& callback,
dbus::Response* response) {
if (!response)
diff --git a/chromeos/dbus/debug_daemon_client.h b/chromeos/dbus/debug_daemon_client.h
index 9a4d678..b91d2c1 100644
--- a/chromeos/dbus/debug_daemon_client.h
+++ b/chromeos/dbus/debug_daemon_client.h
@@ -83,17 +83,6 @@ class CHROMEOS_EXPORT DebugDaemonClient : public DBusClient {
virtual void GetNetworkInterfaces(
const GetNetworkInterfacesCallback& callback) = 0;
- // Called once GetPerfData() is complete only if the the data is successfully
- // obtained from debugd.
- typedef base::Callback<void(const std::vector<uint8>& data)>
- GetPerfDataCallback;
-
- // Runs perf for |duration| seconds and returns data collected.
- // TODO(sque): This is being replaced by GetPerfOutput(). Remove this function
- // and the above callback typedef when the new function is running.
- virtual void GetPerfData(uint32_t duration,
- const GetPerfDataCallback& callback) = 0;
-
// Called once GetPerfOutput() is complete only if the the data is
// successfully obtained from debugd.
// Arguments:
diff --git a/chromeos/dbus/fake_debug_daemon_client.cc b/chromeos/dbus/fake_debug_daemon_client.cc
index 8b2124d..2848e5b 100644
--- a/chromeos/dbus/fake_debug_daemon_client.cc
+++ b/chromeos/dbus/fake_debug_daemon_client.cc
@@ -80,13 +80,6 @@ void FakeDebugDaemonClient::GetNetworkInterfaces(
FROM_HERE, base::Bind(callback, false, ""));
}
-void FakeDebugDaemonClient::GetPerfData(uint32_t duration,
- const GetPerfDataCallback& callback) {
- std::vector<uint8> data;
- base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
- base::Bind(callback, data));
-}
-
void FakeDebugDaemonClient::GetPerfOutput(
uint32_t duration,
const GetPerfOutputCallback& callback) {
diff --git a/chromeos/dbus/fake_debug_daemon_client.h b/chromeos/dbus/fake_debug_daemon_client.h
index 7d3547c..1ddd8c0 100644
--- a/chromeos/dbus/fake_debug_daemon_client.h
+++ b/chromeos/dbus/fake_debug_daemon_client.h
@@ -39,8 +39,6 @@ class CHROMEOS_EXPORT FakeDebugDaemonClient : public DebugDaemonClient {
void GetWiMaxStatus(const GetWiMaxStatusCallback& callback) override;
void GetNetworkInterfaces(
const GetNetworkInterfacesCallback& callback) override;
- void GetPerfData(uint32_t duration,
- const GetPerfDataCallback& callback) override;
void GetPerfOutput(uint32_t duration,
const GetPerfOutputCallback& callback) override;
void GetScrubbedLogs(const GetLogsCallback& callback) override;