| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_TEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_TEST_UTIL_H_ |
| 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_TEST_UTIL_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/memory/ref_counted.h" | |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 | 9 |
| 12 namespace base { | 10 namespace base { |
| 13 class RunLoop; | 11 class RunLoop; |
| 14 class SingleThreadTaskRunner; | |
| 15 } | 12 } |
| 16 | 13 |
| 17 namespace sync_file_system { | 14 namespace sync_file_system { |
| 18 | 15 |
| 19 template <typename R> | 16 template <typename R> |
| 20 void AssignAndQuit(base::RunLoop* run_loop, R* result_out, R result); | 17 void AssignAndQuit(base::RunLoop* run_loop, R* result_out, R result); |
| 21 | 18 |
| 22 template <typename R> base::Callback<void(R)> | 19 template <typename R> base::Callback<void(R)> |
| 23 AssignAndQuitCallback(base::RunLoop* run_loop, R* result); | 20 AssignAndQuitCallback(base::RunLoop* run_loop, R* result); |
| 24 | 21 |
| 22 template <typename Arg> |
| 23 base::Callback<void(Arg)> CreateResultReceiver(Arg* arg_out); |
| 24 |
| 25 template <typename Arg1, typename Arg2> |
| 26 base::Callback<void(Arg1, Arg2)> CreateResultReceiver(Arg1* arg1_out, |
| 27 Arg2* arg2_out); |
| 28 |
| 25 } // namespace sync_file_system | 29 } // namespace sync_file_system |
| 26 | 30 |
| 27 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_TEST_UTIL_H_ | 31 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_TEST_UTIL_H_ |
| OLD | NEW |