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

Unified Diff: chrome/browser/google_apis/task_util.h

Issue 14235017: Implement ComposedCallback with three arguments and the second one is scoped_ptr. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_apis/task_util.h
diff --git a/chrome/browser/google_apis/task_util.h b/chrome/browser/google_apis/task_util.h
index 887cdb4ad12863550159d1c0e562f24e2ba731a4..69cf846c1fe98ad6d0c8c73b9dfffb38e7948f0e 100644
--- a/chrome/browser/google_apis/task_util.h
+++ b/chrome/browser/google_apis/task_util.h
@@ -66,6 +66,17 @@ struct ComposedCallback<void(T1, T2, T3)> {
}
};
+// ComposedCallback with three arguments, and the second one is scoped_ptr.
+template<typename T1, typename T2, typename D2, typename T3>
+struct ComposedCallback<void(T1, scoped_ptr<T2, D2>, T3)> {
+ static void Run(
+ const base::Callback<void(const base::Closure&)>& runner,
+ const base::Callback<void(T1, scoped_ptr<T2, D2>, T3)>& callback,
+ T1 arg1, scoped_ptr<T2, D2> arg2, T3 arg3) {
+ runner.Run(base::Bind(callback, arg1, base::Passed(&arg2), arg3));
+ }
+};
+
// ComposedCallback with three arguments, and the last one is scoped_ptr.
template<typename T1, typename T2, typename T3, typename D3>
struct ComposedCallback<void(T1, T2, scoped_ptr<T3, D3>)> {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698