Change ToRawPointers method call to MakeNonOwningPointerVector in reporter.cc

This CL removes the code for the ToRawPointers method previously
introduced in libartbase/base/utils.h, as an equivalent
MakeNonOwningPointerVector method exists in libartbase/base/stl_util.h

Ignore-AOSP-First: this change is to be applied on top of ag/20595797, which has been cherry-picked onto AOSP yet.

Bug: 246330418
Test: atest ArtGtestsTargetChroot
Change-Id: I06aa2d733e5ee5bd00429b6dff585394bcc807d0
  (cherry picked from commit Ie412542e014899d50a47a6375b730c70211c6c26)
Merged-In: I06aa2d733e5ee5bd00429b6dff585394bcc807d0
diff --git a/libartbase/base/utils.h b/libartbase/base/utils.h
index b32dcec..f311f09 100644
--- a/libartbase/base/utils.h
+++ b/libartbase/base/utils.h
@@ -186,19 +186,6 @@
 // Returns the number of threads running.
 int GetTaskCount();
 
-// Returns a vector holding the raw pointer targets of the elements of "unique_pointers", a vector
-// of smart pointers. This does not affect the target objects e.g. by incrementing ref-counts; it's
-// a raw pointer read.
-template <typename T>
-static std::vector<T*> ToRawPointers(const std::vector<std::unique_ptr<T>>& unique_pointers) {
-  std::vector<T*> raw_pointers;
-  raw_pointers.reserve(unique_pointers.size());
-  for (const std::unique_ptr<T>& p : unique_pointers) {
-    raw_pointers.push_back(p.get());
-  }
-  return raw_pointers;
-}
-
 }  // namespace art
 
 #endif  // ART_LIBARTBASE_BASE_UTILS_H_
diff --git a/runtime/metrics/reporter.cc b/runtime/metrics/reporter.cc
index 736ef7f..6fc1a14 100644
--- a/runtime/metrics/reporter.cc
+++ b/runtime/metrics/reporter.cc
@@ -16,11 +16,12 @@
 
 #include "reporter.h"
 
-#include <algorithm>
-
 #include <android-base/parseint.h>
 
+#include <algorithm>
+
 #include "base/flags.h"
+#include "base/stl_util.h"
 #include "oat_file_manager.h"
 #include "runtime.h"
 #include "runtime_options.h"
@@ -208,7 +209,7 @@
     session_started_ = true;
   }
 
-  metrics->ReportAllMetricsAndResetValueMetrics(ToRawPointers(backends_));
+  metrics->ReportAllMetricsAndResetValueMetrics(MakeNonOwningPointerVector(backends_));
 }
 
 void MetricsReporter::UpdateSessionInBackends() {