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

Unified Diff: components/discardable_memory/common/discardable_shared_memory_heap_perftest.cc

Issue 2693853002: Revert "Remove scopedvector in //components/discardable_memory/" (Closed)
Patch Set: 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 | « components/discardable_memory/common/discardable_shared_memory_heap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/discardable_memory/common/discardable_shared_memory_heap_perftest.cc
diff --git a/components/discardable_memory/common/discardable_shared_memory_heap_perftest.cc b/components/discardable_memory/common/discardable_shared_memory_heap_perftest.cc
index 4306a3a56ece3714c79360d3673a68e31fe126ae..f4eb81e528a608762041a95aec53e6d34aea9510 100644
--- a/components/discardable_memory/common/discardable_shared_memory_heap_perftest.cc
+++ b/components/discardable_memory/common/discardable_shared_memory_heap_perftest.cc
@@ -13,7 +13,7 @@
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/memory/discardable_shared_memory.h"
-#include "base/memory/ptr_util.h"
+#include "base/memory/scoped_vector.h"
#include "base/process/process_metrics.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/perf/perf_test.h"
@@ -59,7 +59,7 @@ TEST(DiscardableSharedMemoryHeapTest, SearchFreeLists) {
random_blocks[i] = 1 + log(1.0 - v) / -kLambda * kBlocks;
}
- std::vector<std::unique_ptr<base::ScopedClosureRunner>> spans;
+ ScopedVector<base::ScopedClosureRunner> spans;
base::TimeTicks start = base::TimeTicks::Now();
base::TimeTicks end = start + base::TimeDelta::FromMilliseconds(kTimeLimitMs);
@@ -73,7 +73,7 @@ TEST(DiscardableSharedMemoryHeapTest, SearchFreeLists) {
std::unique_ptr<DiscardableSharedMemoryHeap::Span> span =
heap.SearchFreeLists(random_blocks[i], slack);
if (span) {
- spans.push_back(base::MakeUnique<base::ScopedClosureRunner>(
+ spans.push_back(new base::ScopedClosureRunner(
base::Bind(&DiscardableSharedMemoryHeap::MergeIntoFreeLists,
base::Unretained(&heap), base::Passed(&span))));
} else if (!spans.empty()) {
« no previous file with comments | « components/discardable_memory/common/discardable_shared_memory_heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698