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

Side by Side Diff: base/sequence_checker_unittest.cc

Issue 2791243002: Rewrite base::Bind into base::BindOnce on trivial cases in base (Closed)
Patch Set: rebase Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « base/run_loop_unittest.cc ('k') | base/sequenced_task_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 sequence_checker.DetachFromSequence(); 243 sequence_checker.DetachFromSequence();
244 244
245 PostToSequencedWorkerPool( 245 PostToSequencedWorkerPool(
246 Bind(&ExpectCalledOnValidSequence, Unretained(&sequence_checker)), "A"); 246 Bind(&ExpectCalledOnValidSequence, Unretained(&sequence_checker)), "A");
247 PostToSequencedWorkerPool( 247 PostToSequencedWorkerPool(
248 Bind(&ExpectCalledOnValidSequence, Unretained(&sequence_checker)), "A"); 248 Bind(&ExpectCalledOnValidSequence, Unretained(&sequence_checker)), "A");
249 FlushSequencedWorkerPoolForTesting(); 249 FlushSequencedWorkerPoolForTesting();
250 250
251 SequencedWorkerPoolOwner second_pool_owner(kNumWorkerThreads, "test2"); 251 SequencedWorkerPoolOwner second_pool_owner(kNumWorkerThreads, "test2");
252 second_pool_owner.pool()->PostNamedSequencedWorkerTask( 252 second_pool_owner.pool()->PostNamedSequencedWorkerTask(
253 "A", FROM_HERE, base::Bind(&ExpectNotCalledOnValidSequence, 253 "A", FROM_HERE,
254 base::Unretained(&sequence_checker))); 254 base::BindOnce(&ExpectNotCalledOnValidSequence,
255 base::Unretained(&sequence_checker)));
255 second_pool_owner.pool()->FlushForTesting(); 256 second_pool_owner.pool()->FlushForTesting();
256 } 257 }
257 258
258 } // namespace base 259 } // namespace base
OLDNEW
« no previous file with comments | « base/run_loop_unittest.cc ('k') | base/sequenced_task_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698