Index: chrome/browser/sync_file_system/sync_file_system_service_unittest.cc |
diff --git a/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc b/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc |
index c4d0035d7aadc7cb1d402e11226285426421adf6..84752198d2f82a5775d749e0d9b9c5ea55294420 100644 |
--- a/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc |
+++ b/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc |
@@ -73,12 +73,11 @@ void AssignValueAndQuit(base::RunLoop* run_loop, |
run_loop->Quit(); |
} |
-// This is called on IO thread. |
-void VerifyFileError(base::RunLoop* run_loop, |
+// This is called on IO thread. Posts |callback| to be called on UI thread. |
+void VerifyFileError(base::Closure callback, |
base::File::Error error) { |
- DCHECK(run_loop); |
EXPECT_EQ(base::File::FILE_OK, error); |
- run_loop->Quit(); |
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, callback); |
} |
} // namespace |
@@ -430,7 +429,7 @@ TEST_F(SyncFileSystemServiceTest, SimpleSyncFlowWithFileBusy) { |
base::Bind(&CannedSyncableFileSystem::DoCreateFile, |
base::Unretained(file_system_.get()), |
kFile, base::Bind(&VerifyFileError, |
- &verify_file_error_run_loop))); |
+ verify_file_error_run_loop.QuitClosure()))); |
run_loop.Run(); |