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

Unified Diff: chrome/browser/media_galleries/media_file_system_registry_unittest.cc

Issue 2767893002: Remove ScopedVector from chrome/browser/. (Closed)
Patch Set: Address comments from zea@ Created 3 years, 9 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: chrome/browser/media_galleries/media_file_system_registry_unittest.cc
diff --git a/chrome/browser/media_galleries/media_file_system_registry_unittest.cc b/chrome/browser/media_galleries/media_file_system_registry_unittest.cc
index 4582aab2bd6c09218d90453af26d31d43c43e07f..a12384fee2fd2c352ffde4679a2997eb425991be 100644
--- a/chrome/browser/media_galleries/media_file_system_registry_unittest.cc
+++ b/chrome/browser/media_galleries/media_file_system_registry_unittest.cc
@@ -11,6 +11,7 @@
#include <algorithm>
#include <memory>
#include <set>
+#include <vector>
#include "base/bind_helpers.h"
#include "base/command_line.h"
@@ -19,7 +20,6 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_vector.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
@@ -280,6 +280,10 @@ base::string16 GetExpectedFolderName(const base::FilePath& path) {
class MediaFileSystemRegistryTest : public ChromeRenderViewHostTestHarness {
public:
+ MediaFileSystemRegistryTest() = default;
+
+ ~MediaFileSystemRegistryTest() override = default;
+
void CreateProfileState(size_t profile_count);
ProfileState* GetProfileState(size_t i);
@@ -380,7 +384,9 @@ class MediaFileSystemRegistryTest : public ChromeRenderViewHostTestHarness {
MockProfileSharedRenderProcessHostFactory rph_factory_;
- ScopedVector<ProfileState> profile_states_;
+ std::vector<std::unique_ptr<ProfileState>> profile_states_;
+
+ DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistryTest);
};
namespace {
@@ -604,13 +610,12 @@ int ProfileState::GetAndClearComparisonCount() {
void MediaFileSystemRegistryTest::CreateProfileState(size_t profile_count) {
for (size_t i = 0; i < profile_count; ++i) {
- ProfileState* state = new ProfileState(&rph_factory_);
- profile_states_.push_back(state);
+ profile_states_.push_back(base::MakeUnique<ProfileState>(&rph_factory_));
}
}
ProfileState* MediaFileSystemRegistryTest::GetProfileState(size_t i) {
- return profile_states_[i];
+ return profile_states_[i].get();
}
MediaGalleriesPreferences* MediaFileSystemRegistryTest::GetPreferences(
« no previous file with comments | « chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc ('k') | chrome/browser/net/quota_policy_channel_id_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698