OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_DRIVE_BACKEND_CALLBACK_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_HELPER_H_ |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_HELPER_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_HELPER_H_ |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/sequenced_task_runner.h" | 11 #include "base/sequenced_task_runner.h" |
12 #include "base/thread_task_runner_handle.h" | 12 #include "base/thread_task_runner_handle.h" |
13 | 13 |
14 // TODO(tzik): Merge this file to media/base/bind_to_current_loop.h. | 14 // TODO(tzik): Merge this file to base/bind_to_current_loop.h. |
15 | 15 |
16 namespace sync_file_system { | 16 namespace sync_file_system { |
17 namespace drive_backend { | 17 namespace drive_backend { |
18 | 18 |
19 namespace internal { | 19 namespace internal { |
20 | 20 |
21 template <typename T> | 21 template <typename T> |
22 typename base::enable_if< | 22 typename base::enable_if< |
23 base::internal::IsMoveOnlyType<T>::value, | 23 base::internal::IsMoveOnlyType<T>::value, |
24 base::internal::PassedWrapper<T> >::type | 24 base::internal::PassedWrapper<T> >::type |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 const base::Callback<T>& callback) { | 100 const base::Callback<T>& callback) { |
101 return RelayCallbackToTaskRunner( | 101 return RelayCallbackToTaskRunner( |
102 base::ThreadTaskRunnerHandle::Get(), | 102 base::ThreadTaskRunnerHandle::Get(), |
103 from_here, callback); | 103 from_here, callback); |
104 } | 104 } |
105 | 105 |
106 } // namespace drive_backend | 106 } // namespace drive_backend |
107 } // namespace sync_file_system | 107 } // namespace sync_file_system |
108 | 108 |
109 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_HELPER_H_ | 109 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_HELPER_H_ |
OLD | NEW |