| 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
|
|
|
|
|