| Index: base/critical_closure.h
|
| diff --git a/base/critical_closure.h b/base/critical_closure.h
|
| index ca51ed5cef27d40923ba8e4d99de4044c63fa457..cea6e7af0d086f5eba2c12471cbbcb0ea81e91bd 100644
|
| --- a/base/critical_closure.h
|
| +++ b/base/critical_closure.h
|
| @@ -9,7 +9,8 @@
|
|
|
| namespace base {
|
|
|
| -// Returns a closure that will continue to run for a period of time when the
|
| +// Returns a closure (which may return a result, but must not require any extra
|
| +// arguments) that will continue to run for a period of time when the
|
| // application goes to the background if possible on platforms where
|
| // applications don't execute while backgrounded, otherwise the original task is
|
| // returned.
|
| @@ -23,9 +24,11 @@ namespace base {
|
| // background running time, |MakeCriticalClosure| should be applied on them
|
| // before posting.
|
| #if defined(OS_IOS)
|
| -base::Closure MakeCriticalClosure(const base::Closure& closure);
|
| +template <typename R>
|
| +Callback<R(void)> MakeCriticalClosure(const Callback<R(void)>& closure);
|
| #else
|
| -inline base::Closure MakeCriticalClosure(const base::Closure& closure) {
|
| +template <typename R>
|
| +inline Callback<R(void)> MakeCriticalClosure(const Callback<R(void)>& closure) {
|
| // No-op for platforms where the application does not need to acquire
|
| // background time for closures to finish when it goes into the background.
|
| return closure;
|
|
|