Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2207)

Unified Diff: base/critical_closure.h

Issue 257003007: Introduce a new framework for back-and-forth tracked/protected preferences migration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: run cleanup directly if destination store wasn't altered (i.e. migration completed in previous run,… Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/critical_closure_ios.mm » ('j') | base/critical_closure_ios.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/critical_closure.h
diff --git a/base/critical_closure.h b/base/critical_closure.h
index ca51ed5cef27d40923ba8e4d99de4044c63fa457..e6578479863279b651af9aefbf70fd4d493ef7e1 100644
--- a/base/critical_closure.h
+++ b/base/critical_closure.h
@@ -23,9 +23,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 CallbackType>
+CallbackType MakeCriticalClosure(const CallbackType& closure);
gab 2014/04/30 04:25:00 Had to make this more generic to support use-case
#else
-inline base::Closure MakeCriticalClosure(const base::Closure& closure) {
+template <typename CallbackType>
+inline CallbackType MakeCriticalClosure(const CallbackType& 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;
« no previous file with comments | « no previous file | base/critical_closure_ios.mm » ('j') | base/critical_closure_ios.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698