OLD | NEW |
---|---|
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 Loading... | |
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, |
dcheng
2017/04/05 16:49:50
Nit: I noticed a few unnecessary base:: qualificat
gab
2017/04/06 15:08:47
fdoray actually had a way to only add base:: where
fdoray
2017/04/06 15:42:37
The magic is here: https://bugs.chromium.org/p/chr
tzik
2017/04/11 12:15:02
The number of base::Bind{,Once} seems large to do
| |
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 |
OLD | NEW |