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

Unified Diff: chrome/browser/sync_file_system/drive_backend/drive_backend_util.h

Issue 321783002: [SyncFS] Drop PostTaskAndReply from LocalToRemoteSyncer (5) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 | chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_backend/drive_backend_util.h
diff --git a/chrome/browser/sync_file_system/drive_backend/drive_backend_util.h b/chrome/browser/sync_file_system/drive_backend/drive_backend_util.h
index 30805028c8986ad21e26a7ca6d2a1e323de1b58e..d2045160cff5db67032c071770b04294478cb79d 100644
--- a/chrome/browser/sync_file_system/drive_backend/drive_backend_util.h
+++ b/chrome/browser/sync_file_system/drive_backend/drive_backend_util.h
@@ -7,6 +7,8 @@
#include <string>
+#include "base/bind.h"
+#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h"
@@ -83,6 +85,19 @@ const typename Container::mapped_type& LookUpMap(
return found->second;
}
+template <typename R, typename S, typename T>
+R ComposeFunction(const base::Callback<T()>& g,
+ const base::Callback<R(S)>& f) {
+ return f.Run(g.Run());
+}
+
+template <typename R, typename S, typename T>
+base::Callback<R()> CreateComposedFunction(
+ const base::Callback<T()>& g,
+ const base::Callback<R(S)>& f) {
+ return base::Bind(&ComposeFunction<R, S, T>, g, f);
+}
+
} // namespace drive_backend
} // namespace sync_file_system
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698