Commit 4db10076 authored by Anna Malova's avatar Anna Malova Committed by Commit Bot

Convert DiskCachePerfTest to use RepeatingClosure

Bug: 1007815
Change-Id: I80541af887b21830a703cd7352b4e01590a99d6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089817Reviewed-by: default avatarMaksim Orlovich <morlovich@chromium.org>
Commit-Queue: Anna Malova <amalova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747371}
parent 587d4e0a
...@@ -551,7 +551,7 @@ TEST_F(DiskCachePerfTest, BlockFilesPerformance) { ...@@ -551,7 +551,7 @@ TEST_F(DiskCachePerfTest, BlockFilesPerformance) {
base::RunLoop().RunUntilIdle(); base::RunLoop().RunUntilIdle();
} }
void VerifyRvAndCallClosure(base::Closure* c, int expect_rv, int rv) { void VerifyRvAndCallClosure(base::RepeatingClosure* c, int expect_rv, int rv) {
EXPECT_EQ(expect_rv, rv); EXPECT_EQ(expect_rv, rv);
c->Run(); c->Run();
} }
...@@ -603,7 +603,7 @@ TEST_F(DiskCachePerfTest, SimpleCacheInitialReadPortion) { ...@@ -603,7 +603,7 @@ TEST_F(DiskCachePerfTest, SimpleCacheInitialReadPortion) {
for (int i = 0; i < kIterations; ++i) { for (int i = 0; i < kIterations; ++i) {
base::RunLoop event_loop; base::RunLoop event_loop;
base::Closure barrier = base::RepeatingClosure barrier =
base::BarrierClosure(kBatchSize, event_loop.QuitWhenIdleClosure()); base::BarrierClosure(kBatchSize, event_loop.QuitWhenIdleClosure());
net::CompletionRepeatingCallback cb_batch(base::BindRepeating( net::CompletionRepeatingCallback cb_batch(base::BindRepeating(
VerifyRvAndCallClosure, base::Unretained(&barrier), kHeadersSize)); VerifyRvAndCallClosure, base::Unretained(&barrier), kHeadersSize));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment