| 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 GOOGLE_APIS_DRIVE_TEST_UTIL_H_ | 5 #ifndef GOOGLE_APIS_DRIVE_TEST_UTIL_H_ | 
| 6 #define GOOGLE_APIS_DRIVE_TEST_UTIL_H_ | 6 #define GOOGLE_APIS_DRIVE_TEST_UTIL_H_ | 
| 7 | 7 | 
| 8 #include <string> | 8 #include <string> | 
| 9 #include <utility> | 9 #include <utility> | 
| 10 #include <vector> | 10 #include <vector> | 
| 11 | 11 | 
| 12 #include "base/bind.h" | 12 #include "base/bind.h" | 
| 13 #include "base/callback.h" | 13 #include "base/callback.h" | 
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" | 
| 15 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" | 
| 16 #include "base/template_util.h" | 16 #include "base/template_util.h" | 
| 17 #include "google_apis/drive/base_requests.h" | 17 #include "google_apis/drive/base_requests.h" | 
| 18 #include "google_apis/drive/gdata_errorcode.h" | 18 #include "google_apis/drive/drive_api_error_codes.h" | 
| 19 #include "google_apis/drive/task_util.h" | 19 #include "google_apis/drive/task_util.h" | 
| 20 | 20 | 
| 21 class GURL; | 21 class GURL; | 
| 22 | 22 | 
| 23 namespace base { | 23 namespace base { | 
| 24 class FilePath; | 24 class FilePath; | 
| 25 class RunLoop; | 25 class RunLoop; | 
| 26 class Value; | 26 class Value; | 
| 27 } | 27 } | 
| 28 | 28 | 
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 277  public: | 277  public: | 
| 278   TestGetContentCallback(); | 278   TestGetContentCallback(); | 
| 279   ~TestGetContentCallback(); | 279   ~TestGetContentCallback(); | 
| 280 | 280 | 
| 281   const GetContentCallback& callback() const { return callback_; } | 281   const GetContentCallback& callback() const { return callback_; } | 
| 282   const ScopedVector<std::string>& data() const { return data_; } | 282   const ScopedVector<std::string>& data() const { return data_; } | 
| 283   ScopedVector<std::string>* mutable_data() { return &data_; } | 283   ScopedVector<std::string>* mutable_data() { return &data_; } | 
| 284   std::string GetConcatenatedData() const; | 284   std::string GetConcatenatedData() const; | 
| 285 | 285 | 
| 286  private: | 286  private: | 
| 287   void OnGetContent(google_apis::GDataErrorCode error, | 287   void OnGetContent(google_apis::DriveApiErrorCode error, | 
| 288                     scoped_ptr<std::string> data); | 288                     scoped_ptr<std::string> data); | 
| 289 | 289 | 
| 290   const GetContentCallback callback_; | 290   const GetContentCallback callback_; | 
| 291   ScopedVector<std::string> data_; | 291   ScopedVector<std::string> data_; | 
| 292 | 292 | 
| 293   DISALLOW_COPY_AND_ASSIGN(TestGetContentCallback); | 293   DISALLOW_COPY_AND_ASSIGN(TestGetContentCallback); | 
| 294 }; | 294 }; | 
| 295 | 295 | 
| 296 }  // namespace test_util | 296 }  // namespace test_util | 
| 297 }  // namespace google_apis | 297 }  // namespace google_apis | 
| 298 | 298 | 
| 299 #endif  // GOOGLE_APIS_DRIVE_TEST_UTIL_H_ | 299 #endif  // GOOGLE_APIS_DRIVE_TEST_UTIL_H_ | 
| OLD | NEW | 
|---|