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

Unified Diff: chromecast/browser/metrics/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 | « chrome/browser/chromeos/external_metrics.cc ('k') | components/metrics/daily_event.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/metrics/external_metrics.cc
diff --git a/chromecast/browser/metrics/external_metrics.cc b/chromecast/browser/metrics/external_metrics.cc
index cc1164aafb4cf8bc1af6782640057c18c4a2469f..40de5ba0ad33da89e63b01eeb7b0ed8feb4df51c 100644
--- a/chromecast/browser/metrics/external_metrics.cc
+++ b/chromecast/browser/metrics/external_metrics.cc
@@ -6,7 +6,9 @@
#include <stddef.h>
+#include <memory>
#include <string>
+#include <vector>
#include "base/bind.h"
#include "base/files/file_path.h"
@@ -105,13 +107,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;
switch (sample.type()) {
« no previous file with comments | « chrome/browser/chromeos/external_metrics.cc ('k') | components/metrics/daily_event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698