Index: chrome/browser/sync_file_system/drive_backend/callback_helper.cc |
diff --git a/chrome/browser/sync_file_system/drive_backend/callback_helper.cc b/chrome/browser/sync_file_system/drive_backend/callback_helper.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..95cc1c8d5d9a84c841f95511207726fffec7d012 |
--- /dev/null |
+++ b/chrome/browser/sync_file_system/drive_backend/callback_helper.cc |
@@ -0,0 +1,30 @@ |
+// 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 "chrome/browser/sync_file_system/drive_backend/callback_helper.h" |
+ |
+namespace sync_file_system { |
+namespace drive_backend { |
+ |
+namespace internal { |
peria
2014/04/24 02:38:21
anonymous namespace?
tzik
2014/04/24 06:56:55
Refactored.
|
+ |
+void RelayToTaskRunner0(base::SequencedTaskRunner* task_runner, |
+ const tracked_objects::Location& from_here, |
+ const base::Callback<void()>& callback) { |
+ task_runner->PostTask( |
+ from_here, base::Bind(callback)); |
+} |
+ |
+} |
+ |
+base::Callback<void()> CreateRelayedCallback( |
+ const base::Callback<void()>& callback) { |
+ return base::Bind(&internal::RelayToTaskRunner0, |
+ base::MessageLoopProxy::current(), |
+ FROM_HERE, |
+ callback); |
+} |
+ |
+} // namespace drive_backend |
+} // namespace sync_file_system |