| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 package org.chromium.sync.test.util; | 5 package org.chromium.components.sync.test.util; |
| 6 | 6 |
| 7 import org.chromium.base.Callback; | 7 import org.chromium.base.Callback; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * A simple tool to make waiting for the result of an asynchronous operation eas
y. | 10 * A simple tool to make waiting for the result of an asynchronous operation eas
y. |
| 11 * | 11 * |
| 12 * This class is thread-safe; the result can be provided and retrieved on any th
read. | 12 * This class is thread-safe; the result can be provided and retrieved on any th
read. |
| 13 * | 13 * |
| 14 * Example usage: | 14 * Example usage: |
| 15 * | 15 * |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 */ | 71 */ |
| 72 public Callback<V> createCallback() { | 72 public Callback<V> createCallback() { |
| 73 return new Callback<V>() { | 73 return new Callback<V>() { |
| 74 @Override | 74 @Override |
| 75 public void onResult(V result) { | 75 public void onResult(V result) { |
| 76 provide(result); | 76 provide(result); |
| 77 } | 77 } |
| 78 }; | 78 }; |
| 79 } | 79 } |
| 80 } | 80 } |
| OLD | NEW |