Remove deprecated dbus method call GetPerfData

We are now using the newer GetRichPerfData method call instead.

BUG=chromium:374304
TEST=unit tests and autotests pass

Change-Id: Ie48361a188637576564eabbb4dc781f94803fede
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/200244
Reviewed-by: Emma Rapati <rapati@chromium.org>
Reviewed-by: Ahmad Sharif <asharif@chromium.org>
diff --git a/share/org.chromium.debugd.xml b/share/org.chromium.debugd.xml
index 7ea1db8..95c2499 100644
--- a/share/org.chromium.debugd.xml
+++ b/share/org.chromium.debugd.xml
@@ -179,21 +179,6 @@
         </tp:docstring>
       </arg>
     </method>
-    <method name="GetPerfData">
-      <tp:docstring>
-        Returns perf event data. Does systemwide profiling.
-      </tp:docstring>
-      <arg name="duration" type="u" direction="in">
-        <tp:docstring>
-          Duration to run perf.
-        </tp:docstring>
-      </arg>
-      <arg name="status" type="ay" direction="out">
-        <tp:docstring>
-          Perf event data as a protobuf.
-        </tp:docstring>
-      </arg>
-    </method>
     <method name="GetRichPerfData">
       <tp:docstring>
         Returns perf event data. Does systemwide profiling. It can profile
diff --git a/src/debug_daemon.cc b/src/debug_daemon.cc
index 41ff6fc..4e58b71 100644
--- a/src/debug_daemon.cc
+++ b/src/debug_daemon.cc
@@ -117,11 +117,6 @@
   return wimax_status_tool_->GetWiMaxStatus(error);
 }
 
-std::vector<uint8> DebugDaemon::GetPerfData(const uint32_t& duration,
-                                            DBus::Error& error) {
-  return perf_tool_->GetPerfData(duration, error);
-}
-
 std::vector<uint8> DebugDaemon::GetRichPerfData(const uint32_t& duration,
                                                 DBus::Error& error) {
   return perf_tool_->GetRichPerfData(duration, error);
diff --git a/src/debug_daemon.h b/src/debug_daemon.h
index f2e8834..4548c3f 100644
--- a/src/debug_daemon.h
+++ b/src/debug_daemon.h
@@ -102,8 +102,6 @@
                                       DBus::Error& error); // NOLINT
   virtual std::string GetNetworkStatus(DBus::Error& error); // NOLINT
   virtual std::string GetWiMaxStatus(DBus::Error& error); // NOLINT
-  virtual std::vector<uint8> GetPerfData(const uint32_t& duration,
-                                         DBus::Error& error); // NOLINT
   virtual std::vector<uint8> GetRichPerfData(const uint32_t& duration,
                                              DBus::Error& error); // NOLINT
   virtual void GetDebugLogs(const DBus::FileDescriptor& fd,
diff --git a/src/perf_tool.cc b/src/perf_tool.cc
index f60e218..8e339f1 100644
--- a/src/perf_tool.cc
+++ b/src/perf_tool.cc
@@ -76,15 +76,6 @@
 // can't-fail style, since their output is usually going to be displayed to the
 // user; instead of returning a DBus exception, we tend to return a string
 // indicating what went wrong.
-std::vector<uint8> PerfTool::GetPerfData(const uint32_t& duration_secs,
-                                         DBus::Error& error) { // NOLINT
-  std::string output_string;
-  GetPerfDataHelper(duration_secs, kPerfRecord, error, &output_string);
-  std::vector<uint8> output_vector(output_string.begin(),
-                                   output_string.end());
-  return output_vector;
-}
-
 std::vector<uint8> PerfTool::GetRichPerfData(const uint32_t& duration_secs,
                                              DBus::Error& error) { // NOLINT
   std::string perf_command_line;
diff --git a/src/perf_tool.h b/src/perf_tool.h
index c69bfa5..107e601 100644
--- a/src/perf_tool.h
+++ b/src/perf_tool.h
@@ -19,11 +19,6 @@
   PerfTool();
   ~PerfTool();
 
-  // Runs the perf tool for |duration_secs| seconds in systemwide mode and
-  // returns a protobuf containing the collected data.
-  std::vector<uint8> GetPerfData(const uint32_t& duration_secs,
-                                 DBus::Error& error); // NOLINT
-
   // Randomly runs the perf tool in various modes and collects various events
   // for |duration_secs| seconds and returns a protobuf containing the collected
   // data.