OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef BASE_CRITICAL_CLOSURE_H_ | |
6 #define BASE_CRITICAL_CLOSURE_H_ | |
7 | |
8 #include "base/callback.h" | |
9 | |
10 namespace base { | |
11 | |
12 // Returns a closure that is protected when the application goes to the | |
Mark Mentovai
2012/07/31 23:16:33
You don’t say what “protected” means, but it’s tot
Chen Yu
2012/08/01 11:26:13
Done.
| |
13 // background (on platforms where applications don't execute while backgrounded) | |
14 // if possible, otherwise the original task is returned. | |
15 // | |
16 // Example: | |
17 // file_message_loop_proxy_->PostTask( | |
18 // FROM_HERE, | |
19 // MakeCriticalClosure(base::Bind(&WriteToDiskTask, path_, data))); | |
20 // | |
21 // Note new closures might be posted in this closure. If the new closures need | |
22 // to be protected, |MakeCriticalClosure| should be applied on them before | |
23 // posting. | |
24 base::Closure MakeCriticalClosure(const base::Closure& closure); | |
25 | |
26 } // namespace base | |
27 | |
28 #endif // BASE_CRITICAL_CLOSURE_H_ | |
OLD | NEW |