Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6694)

Unified Diff: chrome/browser/chromeos/external_metrics.cc

Issue 2691803002: Remove ScopedVector in //component/metrics (Closed)
Patch Set: code rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromecast/browser/metrics/external_metrics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/external_metrics.cc
diff --git a/chrome/browser/chromeos/external_metrics.cc b/chrome/browser/chromeos/external_metrics.cc
index 5ca83bc01ba17b733aaf6392dc8f995940795e71..24c5a4c714c439839e494526b740fbb05079fdeb 100644
--- a/chrome/browser/chromeos/external_metrics.cc
+++ b/chrome/browser/chromeos/external_metrics.cc
@@ -7,7 +7,9 @@
#include <stddef.h>
#include <map>
+#include <memory>
#include <string>
+#include <vector>
#include "base/bind.h"
#include "base/metrics/histogram_macros.h"
@@ -133,13 +135,11 @@ void ExternalMetrics::RecordSparseHistogram(
}
int ExternalMetrics::CollectEvents() {
- ScopedVector<metrics::MetricSample> samples;
+ std::vector<std::unique_ptr<metrics::MetricSample>> samples;
metrics::SerializationUtils::ReadAndTruncateMetricsFromFile(uma_events_file_,
&samples);
- for (ScopedVector<metrics::MetricSample>::iterator it = samples.begin();
- it != samples.end();
- ++it) {
+ for (auto it = samples.begin(); it != samples.end(); ++it) {
const metrics::MetricSample& sample = **it;
// Do not use the UMA_HISTOGRAM_... macros here. They cache the Histogram
« no previous file with comments | « no previous file | chromecast/browser/metrics/external_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698