Index: chrome/browser/google_apis/test_util.cc |
diff --git a/chrome/browser/google_apis/test_util.cc b/chrome/browser/google_apis/test_util.cc |
index 27d395767bd5e6f8b2131308b5c218271e2861f5..9dbbf1db66c820f7c147de2a9856fc7baddb52a8 100644 |
--- a/chrome/browser/google_apis/test_util.cc |
+++ b/chrome/browser/google_apis/test_util.cc |
@@ -202,5 +202,27 @@ void AppendProgressCallbackResult(std::vector<ProgressInfo>* progress_values, |
progress_values->push_back(ProgressInfo(progress, total)); |
} |
+TestGetContentCallback::TestGetContentCallback() |
+ : ALLOW_THIS_IN_INITIALIZER_LIST(callback_( |
+ base::Bind(&TestGetContentCallback::OnGetContent, |
+ base::Unretained(this)))) { |
+} |
+ |
+TestGetContentCallback::~TestGetContentCallback() { |
+} |
+ |
+std::string TestGetContentCallback::GetConcatenatedData() const { |
+ std::string result; |
+ for (size_t i = 0; i < data_.size(); ++i) { |
+ result += *data_[i]; |
+ } |
+ return result; |
+} |
+ |
+void TestGetContentCallback::OnGetContent(google_apis::GDataErrorCode error, |
+ scoped_ptr<std::string> data) { |
+ data_.push_back(data.release()); |
+} |
+ |
} // namespace test_util |
} // namespace google_apis |