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 // Returns a closure that is protected when the application goes to the | |
11 // background if possible, otherwise the original task is returned. | |
stuartmorgan
2012/07/31 07:58:15
s/background/background (on platforms where applic
| |
12 // | |
13 // Example: | |
14 // file_message_loop_proxy_->PostTask( | |
15 // FROM_HERE, | |
16 // MakeCriticalClosure(base::Bind(&WriteToDiskTask, path_, data))); | |
17 // | |
18 // Note new closures might be posted in this closure. If the new closures need | |
19 // to be protected, |MakeCriticalClosure| should be applied on them before | |
20 // posting. | |
21 base::Closure MakeCriticalClosure(const base::Closure& closure); | |
22 | |
23 #endif // BASE_CRITICAL_CLOSURE_H_ | |
OLD | NEW |