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

Side by Side Diff: chrome/browser/google_apis/test_util.h

Issue 14215003: Add ProgressCallback to DriveServiceInterface::DownloadFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/mock_drive_service.cc ('k') | chrome/browser/google_apis/test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698