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

Unified Diff: chrome/browser/google_apis/base_operations_unittest.cc

Issue 11418127: Pass calls to GetDocuments through the scheduler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/google_apis/base_operations_unittest.cc
diff --git a/chrome/browser/google_apis/base_operations_unittest.cc b/chrome/browser/google_apis/base_operations_unittest.cc
index 542466f2b7acbcf5f5e39dc2d71e5378fc9ceade..efe17841b884d3c509f0fdebec36d8da552a972f 100644
--- a/chrome/browser/google_apis/base_operations_unittest.cc
+++ b/chrome/browser/google_apis/base_operations_unittest.cc
@@ -43,15 +43,6 @@ class JsonParseTestGetDataOperation : public GetDataOperation {
}
};
-// Copies the results from GetDataCallback.
-void CopyResultsFromGetDataCallback(GDataErrorCode* error_out,
- scoped_ptr<base::Value>* value_out,
- GDataErrorCode error_in,
- scoped_ptr<base::Value> value_in) {
- value_out->swap(value_in);
- *error_out = error_in;
-}
-
} // namespace
class BaseOperationsTest : public testing::Test {
@@ -81,7 +72,9 @@ TEST_F(BaseOperationsTest, GetDataOperation_ParseValidJson) {
JsonParseTestGetDataOperation* get_data =
new JsonParseTestGetDataOperation(
runner_->operation_registry(),
- base::Bind(&CopyResultsFromGetDataCallback, &error, &value));
+ base::Bind(&test_util::CopyResultsFromGetDataCallback,
+ &error,
+ &value));
get_data->NotifyStart();
const std::string valid_json_str = "{ \"test\": 123 }";
@@ -108,7 +101,9 @@ TEST_F(BaseOperationsTest, GetDataOperation_ParseInvalidJson) {
JsonParseTestGetDataOperation* get_data =
new JsonParseTestGetDataOperation(
runner_->operation_registry(),
- base::Bind(&CopyResultsFromGetDataCallback, &error, &value));
+ base::Bind(&test_util::CopyResultsFromGetDataCallback,
+ &error,
+ &value));
get_data->NotifyStart();
const std::string invalid_json_str = "$$$";

Powered by Google App Engine
This is Rietveld 408576698