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 BASE_CRITICAL_CLOSURE_H_ | 5 #ifndef BASE_CRITICAL_CLOSURE_H_ |
6 #define BASE_CRITICAL_CLOSURE_H_ | 6 #define BASE_CRITICAL_CLOSURE_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" |
| 10 #include "build/build_config.h" |
9 | 11 |
10 #if defined(OS_IOS) | 12 #if defined(OS_IOS) |
11 #include "base/bind.h" | 13 #include "base/bind.h" |
12 #include "base/ios/scoped_critical_action.h" | 14 #include "base/ios/scoped_critical_action.h" |
13 #endif | 15 #endif |
14 | 16 |
15 namespace base { | 17 namespace base { |
16 | 18 |
17 namespace internal { | 19 namespace internal { |
18 | 20 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 inline Callback<R(void)> MakeCriticalClosure(const Callback<R(void)>& closure) { | 73 inline Callback<R(void)> MakeCriticalClosure(const Callback<R(void)>& closure) { |
72 // No-op for platforms where the application does not need to acquire | 74 // No-op for platforms where the application does not need to acquire |
73 // background time for closures to finish when it goes into the background. | 75 // background time for closures to finish when it goes into the background. |
74 return closure; | 76 return closure; |
75 } | 77 } |
76 #endif // defined(OS_IOS) | 78 #endif // defined(OS_IOS) |
77 | 79 |
78 } // namespace base | 80 } // namespace base |
79 | 81 |
80 #endif // BASE_CRITICAL_CLOSURE_H_ | 82 #endif // BASE_CRITICAL_CLOSURE_H_ |
OLD | NEW |