| Index: chrome/browser/google_apis/test_util.h
|
| diff --git a/chrome/browser/google_apis/test_util.h b/chrome/browser/google_apis/test_util.h
|
| index e230894c90d3336f80cc2846a1e7e492e0990621..733b5676916640b0f54f8f559926e146c6d7ac06 100644
|
| --- a/chrome/browser/google_apis/test_util.h
|
| +++ b/chrome/browser/google_apis/test_util.h
|
| @@ -12,7 +12,9 @@
|
| #include "base/bind.h"
|
| #include "base/callback.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/memory/scoped_vector.h"
|
| #include "base/template_util.h"
|
| +#include "chrome/browser/google_apis/base_operations.h"
|
| #include "chrome/browser/google_apis/gdata_errorcode.h"
|
|
|
| class GURL;
|
| @@ -274,6 +276,27 @@ void AppendProgressCallbackResult(std::vector<ProgressInfo>* progress_values,
|
| int64 progress,
|
| int64 total);
|
|
|
| +// Helpeer utility for recording the content via GetContentCallback.
|
| +class TestGetContentCallback {
|
| + public:
|
| + TestGetContentCallback();
|
| + ~TestGetContentCallback();
|
| +
|
| + const GetContentCallback& callback() const { return callback_; }
|
| + const ScopedVector<std::string>& data() const { return data_; }
|
| + ScopedVector<std::string>* mutable_data() { return &data_; }
|
| + std::string GetConcatenatedData() const;
|
| +
|
| + private:
|
| + void OnGetContent(google_apis::GDataErrorCode error,
|
| + scoped_ptr<std::string> data);
|
| +
|
| + const GetContentCallback callback_;
|
| + ScopedVector<std::string> data_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(TestGetContentCallback);
|
| +};
|
| +
|
| } // namespace test_util
|
| } // namespace google_apis
|
|
|
|
|