summaryrefslogtreecommitdiffstats
path: root/base/critical_closure_internal_ios.mm
diff options
context:
space:
mode:
authorgab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-09 11:57:31 +0000
committergab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-09 11:57:31 +0000
commit16d3e3de030b8f8fd15056f8eacab657ea5be73d (patch)
tree3d594836da8bd7acdcda713e9853e013748a3bd3 /base/critical_closure_internal_ios.mm
parentd24692452eaf11b69a3c93d3002261e70d4c6ac6 (diff)
downloadchromium_src-16d3e3de030b8f8fd15056f8eacab657ea5be73d.zip
chromium_src-16d3e3de030b8f8fd15056f8eacab657ea5be73d.tar.gz
chromium_src-16d3e3de030b8f8fd15056f8eacab657ea5be73d.tar.bz2
Allow MakeCriticalClosure to enclose closures with non-void return types.
This is required in order to allow ImportantFileWriter::WriteFileAtomically() to report its bool result to the calling thread via PostTaskAndReplyWithResult() in https://codereview.chromium.org/257003007/ BUG=365769 R=stuartmorgan@chromium.org, thakis@chromium.org Review URL: https://codereview.chromium.org/274773003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269238 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/critical_closure_internal_ios.mm')
-rw-r--r--base/critical_closure_internal_ios.mm17
1 files changed, 17 insertions, 0 deletions
diff --git a/base/critical_closure_internal_ios.mm b/base/critical_closure_internal_ios.mm
new file mode 100644
index 0000000..b8fec14
--- /dev/null
+++ b/base/critical_closure_internal_ios.mm
@@ -0,0 +1,17 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/critical_closure.h"
+
+#import <UIKit/UIKit.h>
+
+namespace base {
+namespace internal {
+
+bool IsMultiTaskingSupported() {
+ return [[UIDevice currentDevice] isMultitaskingSupported];
+}
+
+} // namespace internal
+} // namespace base