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

Unified Diff: content/renderer/scheduler/resource_dispatch_throttler_unittest.cc

Issue 2705073003: Remove ScopedVector from content/renderer/. (Closed)
Patch Set: Rebase only 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 | « content/renderer/render_thread_impl_discardable_memory_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/scheduler/resource_dispatch_throttler_unittest.cc
diff --git a/content/renderer/scheduler/resource_dispatch_throttler_unittest.cc b/content/renderer/scheduler/resource_dispatch_throttler_unittest.cc
index e3e96738d64f3e1710f453f0cdd5a1a90a6f82e3..ea69da5a07f46a1517d7d5a1efc4d3e99c9c2c67 100644
--- a/content/renderer/scheduler/resource_dispatch_throttler_unittest.cc
+++ b/content/renderer/scheduler/resource_dispatch_throttler_unittest.cc
@@ -7,8 +7,11 @@
#include <stddef.h>
#include <stdint.h>
+#include <memory>
+#include <vector>
+
#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
+#include "base/memory/ptr_util.h"
#include "content/common/resource_messages.h"
#include "content/common/resource_request.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -21,7 +24,7 @@ const uint32_t kRequestsPerFlush = 4;
const double kFlushPeriodSeconds = 1.f / 60;
const int kRoutingId = 1;
-typedef ScopedVector<IPC::Message> ScopedMessages;
+typedef std::vector<std::unique_ptr<IPC::Message>> ScopedMessages;
int GetRequestId(const IPC::Message& msg) {
int request_id = -1;
@@ -113,7 +116,7 @@ class ResourceDispatchThrottlerTest : public testing::Test, public IPC::Sender {
// IPC::Sender implementation:
bool Send(IPC::Message* msg) override {
- sent_messages_.push_back(msg);
+ sent_messages_.push_back(base::WrapUnique(msg));
return true;
}
@@ -170,7 +173,7 @@ class ResourceDispatchThrottlerTest : public testing::Test, public IPC::Sender {
}
const IPC::Message* LastSentMessage() const {
- return sent_messages_.empty() ? nullptr : sent_messages_.back();
+ return sent_messages_.empty() ? nullptr : sent_messages_.back().get();
}
int LastSentRequestId() const {
« no previous file with comments | « content/renderer/render_thread_impl_discardable_memory_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698