| 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 "base/barrier_closure.h" | 5 #include "base/barrier_closure.h" |
| 6 | 6 |
| 7 #include "base/atomic_ref_count.h" | 7 #include "base/atomic_ref_count.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 DCHECK(num_callbacks_left >= 0); | 42 DCHECK(num_callbacks_left >= 0); |
| 43 | 43 |
| 44 if (num_callbacks_left == 0) | 44 if (num_callbacks_left == 0) |
| 45 done_closure.Run(); | 45 done_closure.Run(); |
| 46 | 46 |
| 47 return base::Bind(&BarrierInfo::Run, | 47 return base::Bind(&BarrierInfo::Run, |
| 48 base::Owned( | 48 base::Owned( |
| 49 new BarrierInfo(num_callbacks_left, done_closure))); | 49 new BarrierInfo(num_callbacks_left, done_closure))); |
| 50 } | 50 } |
| 51 | 51 |
| 52 } // namespace base | 52 } // namespace base |
| OLD | NEW |