From a90ed027dc3229751993fd84549b600be2ccc2a3 Mon Sep 17 00:00:00 2001 From: dhsharp Date: Thu, 3 Sep 2015 10:51:05 -0700 Subject: 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} --- chromeos/dbus/debug_daemon_client.cc | 35 ------------------------------- chromeos/dbus/debug_daemon_client.h | 11 ---------- chromeos/dbus/fake_debug_daemon_client.cc | 7 ------- chromeos/dbus/fake_debug_daemon_client.h | 2 -- 4 files changed, 55 deletions(-) (limited to 'chromeos') 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 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& 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 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; -- cgit v1.1