| Index: chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_fake_unittest.cc
|
| diff --git a/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_fake_unittest.cc b/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_fake_unittest.cc
|
| index 9d8ec4890d6c2e3802e96223d1d1587bd3f5a6d4..94cf959e90219276127b567978b96df5dd4101b0 100644
|
| --- a/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_fake_unittest.cc
|
| +++ b/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_fake_unittest.cc
|
| @@ -27,6 +27,7 @@
|
| #include "chrome/browser/sync_file_system/sync_direction.h"
|
| #include "chrome/browser/sync_file_system/sync_file_metadata.h"
|
| #include "chrome/browser/sync_file_system/sync_file_system.pb.h"
|
| +#include "chrome/browser/sync_file_system/sync_file_system_test_util.h"
|
| #include "chrome/browser/sync_file_system/syncable_file_system_util.h"
|
| #include "chrome/test/base/testing_profile.h"
|
| #include "content/public/test/test_browser_thread_bundle.h"
|
| @@ -78,36 +79,6 @@ void DidInitialize(bool* done, SyncStatusCode status, bool created) {
|
| EXPECT_TRUE(created);
|
| }
|
|
|
| -void DidProcessRemoteChange(SyncStatusCode* status_out,
|
| - fileapi::FileSystemURL* url_out,
|
| - SyncStatusCode status,
|
| - const fileapi::FileSystemURL& url) {
|
| - ASSERT_TRUE(status_out);
|
| - ASSERT_TRUE(url_out);
|
| - *status_out = status;
|
| - *url_out = url;
|
| -}
|
| -
|
| -#if !defined(OS_ANDROID)
|
| -void DidGetRemoteVersions(
|
| - SyncStatusCode* status_out,
|
| - std::vector<RemoteFileSyncService::Version>* versions_out,
|
| - SyncStatusCode status,
|
| - const std::vector<RemoteFileSyncService::Version>& versions) {
|
| - *status_out = status;
|
| - *versions_out = versions;
|
| -}
|
| -
|
| -void DidDownloadRemoteVersion(
|
| - SyncStatusCode* status_out,
|
| - webkit_blob::ScopedFile* downloaded_out,
|
| - SyncStatusCode status,
|
| - webkit_blob::ScopedFile downloaded) {
|
| - *status_out = status;
|
| - *downloaded_out = downloaded.Pass();
|
| -}
|
| -#endif // !defined(OS_ANDROID)
|
| -
|
| void ExpectEqStatus(bool* done,
|
| SyncStatusCode expected,
|
| SyncStatusCode actual) {
|
| @@ -375,7 +346,7 @@ class DriveFileSyncServiceFakeTest : public testing::Test {
|
| }
|
|
|
| sync_service_->ProcessRemoteChange(
|
| - base::Bind(&DidProcessRemoteChange, &actual_status, &actual_url));
|
| + CreateResultReceiverConst(&actual_status, &actual_url));
|
| base::RunLoop().RunUntilIdle();
|
|
|
| EXPECT_EQ(expected_status, actual_status);
|
| @@ -800,7 +771,7 @@ void DriveFileSyncServiceFakeTest::TestGetRemoteVersions() {
|
| SyncStatusCode status = SYNC_STATUS_FAILED;
|
| std::vector<RemoteFileSyncService::Version> versions;
|
| sync_service_->GetRemoteVersions(
|
| - url, base::Bind(&DidGetRemoteVersions, &status, &versions));
|
| + url, CreateResultReceiverConst(&status, &versions));
|
| base::RunLoop().RunUntilIdle();
|
|
|
| ASSERT_EQ(SYNC_STATUS_OK, status);
|
| @@ -813,8 +784,7 @@ void DriveFileSyncServiceFakeTest::TestGetRemoteVersions() {
|
| status = SYNC_STATUS_FAILED;
|
| webkit_blob::ScopedFile downloaded;
|
| sync_service_->DownloadRemoteVersion(
|
| - url, versions[0].id,
|
| - base::Bind(&DidDownloadRemoteVersion, &status, &downloaded));
|
| + url, versions[0].id, CreateResultReceiver(&status, &downloaded));
|
| base::RunLoop().RunUntilIdle();
|
|
|
| ASSERT_EQ(SYNC_STATUS_OK, status);
|
|
|