summaryrefslogtreecommitdiffstats
path: root/base/bind_helpers.cc
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-06 22:12:28 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-06 22:12:28 +0000
commitc694427c13725a8d73303fbe2c47e8cbd6abd6c3 (patch)
treeed40f286e831e116b5718f37e454d8dace85abfb /base/bind_helpers.cc
parent0b8545bf5feeb7e5340eeff11279402c2d06a778 (diff)
downloadchromium_src-c694427c13725a8d73303fbe2c47e8cbd6abd6c3.zip
chromium_src-c694427c13725a8d73303fbe2c47e8cbd6abd6c3.tar.gz
chromium_src-c694427c13725a8d73303fbe2c47e8cbd6abd6c3.tar.bz2
Remove task.h and finish base::Bind() migration.
Over 341 CLs, in ~3 months, touching 3251 unique files! Top 5 most CLs: (121) jhawkins ( 45) dcheng ( 24) achuith ( 23) csilv ( 12) tfarina ( 12) groby ~1000 files touched: (918) jhawkins 100+ files touched: (486) ajwong (385) willchan (372) dcheng (126) csilv (123) fischman (112) sergeyu 49+ files touched: (65) tfarina (57) acolwell (52) adamk (49) tzik BUG=35223 TEST=existing Review URL: http://codereview.chromium.org/9114020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116748 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/bind_helpers.cc')
-rw-r--r--base/bind_helpers.cc29
1 files changed, 29 insertions, 0 deletions
diff --git a/base/bind_helpers.cc b/base/bind_helpers.cc
new file mode 100644
index 0000000..f2fc3bb
--- /dev/null
+++ b/base/bind_helpers.cc
@@ -0,0 +1,29 @@
+// Copyright (c) 2012 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/bind_helpers.h"
+
+#include "base/callback.h"
+
+namespace base {
+
+void DoNothing() {
+}
+
+ScopedClosureRunner::ScopedClosureRunner(const Closure& closure)
+ : closure_(closure) {
+}
+
+ScopedClosureRunner::~ScopedClosureRunner() {
+ if (!closure_.is_null())
+ closure_.Run();
+}
+
+Closure ScopedClosureRunner::Release() {
+ Closure result = closure_;
+ closure_.Reset();
+ return result;
+}
+
+} // namespace base