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

Unified Diff: chrome/browser/extensions/app_data_migrator_unittest.cc

Issue 2083363002: Remove calls to deprecated MessageLoop methods in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months 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/extensions/app_data_migrator_unittest.cc
diff --git a/chrome/browser/extensions/app_data_migrator_unittest.cc b/chrome/browser/extensions/app_data_migrator_unittest.cc
index 2bb98f02364b4e6eac8c5266e0bc67254e80d845..ac2610dd97041b62aec404dc03290cb7e33ea82d 100644
--- a/chrome/browser/extensions/app_data_migrator_unittest.cc
+++ b/chrome/browser/extensions/app_data_migrator_unittest.cc
@@ -8,6 +8,7 @@
#include <utility>
#include "base/callback_forward.h"
+#include "base/run_loop.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/extensions/app_data_migrator.h"
@@ -138,7 +139,7 @@ void OpenFileSystems(storage::FileSystemContext* fs_context,
fs_context->OpenFileSystem(extension_url, storage::kFileSystemTypePersistent,
storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
base::Bind(&DidOpenFileSystem));
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
void GenerateTestFiles(content::MockBlobURLRequestContext* url_request_context,
@@ -169,16 +170,16 @@ void GenerateTestFiles(content::MockBlobURLRequestContext* url_request_context,
fs_context->operation_runner()->CreateFile(fs_persistent_url, false,
base::Bind(&DidCreate));
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
fs_context->operation_runner()->Write(url_request_context, fs_temp_url,
blob1.GetBlobDataHandle(), 0,
base::Bind(&DidWrite));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
fs_context->operation_runner()->Write(url_request_context, fs_persistent_url,
blob1.GetBlobDataHandle(), 0,
base::Bind(&DidWrite));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
}
void VerifyFileContents(base::File file,
@@ -220,11 +221,11 @@ void VerifyTestFilesMigrated(content::StoragePartition* new_partition,
new_fs_context->operation_runner()->OpenFile(
fs_temp_url, base::File::FLAG_READ | base::File::FLAG_OPEN,
base::Bind(&VerifyFileContents));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
new_fs_context->operation_runner()->OpenFile(
fs_persistent_url, base::File::FLAG_READ | base::File::FLAG_OPEN,
base::Bind(&VerifyFileContents));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
}
TEST_F(AppDataMigratorTest, ShouldMigrate) {
@@ -267,7 +268,7 @@ TEST_F(AppDataMigratorTest, FileSystemMigration) {
migrator_->DoMigrationAndReply(old_ext.get(), new_ext.get(),
base::Bind(&MigrationCallback));
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
registry_->AddEnabled(new_ext);
GURL extension_url =

Powered by Google App Engine
This is Rietveld 408576698