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

Unified Diff: components/sync_driver/device_count_metrics_provider_unittest.cc

Issue 1907683003: Convert //components/sync_driver from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix, address feedback Created 4 years, 8 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
Index: components/sync_driver/device_count_metrics_provider_unittest.cc
diff --git a/components/sync_driver/device_count_metrics_provider_unittest.cc b/components/sync_driver/device_count_metrics_provider_unittest.cc
index 63222f87e50ab8f8c80808d141b897a7c07a4916..702b439d25cecc518c0ce8d6daad975feacae2be 100644
--- a/components/sync_driver/device_count_metrics_provider_unittest.cc
+++ b/components/sync_driver/device_count_metrics_provider_unittest.cc
@@ -4,11 +4,11 @@
#include "components/sync_driver/device_count_metrics_provider.h"
+#include <memory>
#include <string>
#include <vector>
#include "base/bind.h"
-#include "base/memory/scoped_ptr.h"
#include "base/test/histogram_tester.h"
#include "components/sync_driver/device_info.h"
#include "components/sync_driver/device_info_tracker.h"
@@ -24,9 +24,9 @@ class FakeTracker : public DeviceInfoTracker {
// DeviceInfoTracker
bool IsSyncing() const override { return false; }
- scoped_ptr<DeviceInfo> GetDeviceInfo(
+ std::unique_ptr<DeviceInfo> GetDeviceInfo(
const std::string& client_id) const override {
- return scoped_ptr<DeviceInfo>();
+ return std::unique_ptr<DeviceInfo>();
}
ScopedVector<DeviceInfo> GetAllDeviceInfo() const override {
return ScopedVector<DeviceInfo>();
@@ -49,7 +49,8 @@ class DeviceCountMetricsProviderTest : public testing::Test {
base::Unretained(this))) {}
void AddTracker(const int count) {
- trackers_.push_back(scoped_ptr<DeviceInfoTracker>(new FakeTracker(count)));
+ trackers_.push_back(
+ std::unique_ptr<DeviceInfoTracker>(new FakeTracker(count)));
}
void GetTrackers(std::vector<const DeviceInfoTracker*>* trackers) {
for (const auto& tracker : trackers_) {
@@ -66,7 +67,7 @@ class DeviceCountMetricsProviderTest : public testing::Test {
private:
DeviceCountMetricsProvider metrics_provider_;
- std::vector<scoped_ptr<DeviceInfoTracker>> trackers_;
+ std::vector<std::unique_ptr<DeviceInfoTracker>> trackers_;
};
namespace {
« no previous file with comments | « components/sync_driver/device_count_metrics_provider.h ('k') | components/sync_driver/device_info_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698