OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_GOOGLE_APIS_TEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_TEST_UTIL_H_ |
6 #define CHROME_BROWSER_GOOGLE_APIS_TEST_UTIL_H_ | 6 #define CHROME_BROWSER_GOOGLE_APIS_TEST_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
| 9 #include <utility> |
| 10 #include <vector> |
9 | 11 |
10 #include "base/bind.h" | 12 #include "base/bind.h" |
11 #include "base/callback.h" | 13 #include "base/callback.h" |
12 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
13 #include "base/template_util.h" | 15 #include "base/template_util.h" |
14 #include "chrome/browser/google_apis/gdata_errorcode.h" | 16 #include "chrome/browser/google_apis/gdata_errorcode.h" |
15 | 17 |
16 class GURL; | 18 class GURL; |
17 | 19 |
18 namespace base { | 20 namespace base { |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 base::Callback<void(typename internal::CopyResultCallbackHelper<T1>::InType, | 260 base::Callback<void(typename internal::CopyResultCallbackHelper<T1>::InType, |
259 typename internal::CopyResultCallbackHelper<T2>::InType, | 261 typename internal::CopyResultCallbackHelper<T2>::InType, |
260 typename internal::CopyResultCallbackHelper<T3>::InType, | 262 typename internal::CopyResultCallbackHelper<T3>::InType, |
261 typename internal::CopyResultCallbackHelper<T4>::InType)> | 263 typename internal::CopyResultCallbackHelper<T4>::InType)> |
262 CreateCopyResultCallback(T1* out1, T2* out2, T3* out3, T4* out4) { | 264 CreateCopyResultCallback(T1* out1, T2* out2, T3* out3, T4* out4) { |
263 return base::Bind( | 265 return base::Bind( |
264 &internal::CopyResultCallback<T1, T2, T3, T4>, | 266 &internal::CopyResultCallback<T1, T2, T3, T4>, |
265 internal::OutputParams<T1, T2, T3, T4>(out1, out2, out3, out4)); | 267 internal::OutputParams<T1, T2, T3, T4>(out1, out2, out3, out4)); |
266 } | 268 } |
267 | 269 |
| 270 typedef std::pair<int64, int64> ProgressInfo; |
| 271 |
| 272 // Helper utility for recording the results via ProgressCallback. |
| 273 void AppendProgressCallbackResult(std::vector<ProgressInfo>* progress_values, |
| 274 int64 progress, |
| 275 int64 total); |
| 276 |
268 } // namespace test_util | 277 } // namespace test_util |
269 } // namespace google_apis | 278 } // namespace google_apis |
270 | 279 |
271 #endif // CHROME_BROWSER_GOOGLE_APIS_TEST_UTIL_H_ | 280 #endif // CHROME_BROWSER_GOOGLE_APIS_TEST_UTIL_H_ |
OLD | NEW |