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

Unified Diff: content/browser/renderer_host/render_process_host_unittest.cc

Issue 2752533003: Remove ScopedVector from content/browser/. (Closed)
Patch Set: 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: content/browser/renderer_host/render_process_host_unittest.cc
diff --git a/content/browser/renderer_host/render_process_host_unittest.cc b/content/browser/renderer_host/render_process_host_unittest.cc
index 019cae63bbbda035df709425507a5c5265f15891..3bc7a02e07665fefd1eb778972d6f2be38cb2f4d 100644
--- a/content/browser/renderer_host/render_process_host_unittest.cc
+++ b/content/browser/renderer_host/render_process_host_unittest.cc
@@ -5,7 +5,10 @@
#include <stddef.h>
#include <limits>
+#include <memory>
+#include <vector>
+#include "base/memory/ptr_util.h"
#include "build/build_config.h"
#include "content/public/common/content_constants.h"
#include "content/public/test/mock_render_process_host.h"
@@ -50,9 +53,9 @@ TEST_F(RenderProcessHostUnitTest, RendererProcessLimit) {
// Add dummy process hosts to saturate the limit.
ASSERT_NE(0u, kMaxRendererProcessCount);
- ScopedVector<MockRenderProcessHost> hosts;
+ std::vector<std::unique_ptr<MockRenderProcessHost>> hosts;
for (size_t i = 0; i < kMaxRendererProcessCount; ++i) {
- hosts.push_back(new MockRenderProcessHost(browser_context()));
+ hosts.push_back(base::MakeUnique<MockRenderProcessHost>(browser_context()));
}
// Verify that the renderer sharing will happen.
@@ -73,9 +76,9 @@ TEST_F(RenderProcessHostUnitTest, NoRendererProcessLimitOnAndroid) {
// Add a few dummy process hosts.
ASSERT_NE(0u, kMaxRendererProcessCount);
- ScopedVector<MockRenderProcessHost> hosts;
+ std::vector<std::unique_ptr<MockRenderProcessHost>> hosts;
for (size_t i = 0; i < kMaxRendererProcessCount; ++i) {
- hosts.push_back(new MockRenderProcessHost(browser_context()));
+ hosts.push_back(base::MakeUnique<MockRenderProcessHost>(browser_context()));
}
// Verify that the renderer sharing still won't happen.

Powered by Google App Engine
This is Rietveld 408576698