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

Unified Diff: chrome/browser/media_galleries/media_file_system_registry_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/media_galleries/media_file_system_registry_unittest.cc
diff --git a/chrome/browser/media_galleries/media_file_system_registry_unittest.cc b/chrome/browser/media_galleries/media_file_system_registry_unittest.cc
index 8cc44fd4ef116d8d66a201c4dd50d89cb80b32bf..d10e382c9a0fc7b1d7614992fec49fe4be6d3644 100644
--- a/chrome/browser/media_galleries/media_file_system_registry_unittest.cc
+++ b/chrome/browser/media_galleries/media_file_system_registry_unittest.cc
@@ -488,7 +488,7 @@ ProfileState::~ProfileState() {
shared_web_contents2_.reset();
profile_.reset();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
MediaGalleriesPreferences* ProfileState::GetMediaGalleriesPrefs() {
@@ -510,7 +510,7 @@ void ProfileState::CheckGalleries(
base::Bind(&ProfileState::CompareResults, base::Unretained(this),
base::StringPrintf("%s (no permission)", test.c_str()),
base::ConstRef(empty_expectation)));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, GetAndClearComparisonCount());
// Read permission only.
@@ -519,7 +519,7 @@ void ProfileState::CheckGalleries(
base::Bind(&ProfileState::CompareResults, base::Unretained(this),
base::StringPrintf("%s (regular permission)", test.c_str()),
base::ConstRef(regular_extension_galleries)));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, GetAndClearComparisonCount());
// All galleries permission.
@@ -528,7 +528,7 @@ void ProfileState::CheckGalleries(
base::Bind(&ProfileState::CompareResults, base::Unretained(this),
base::StringPrintf("%s (all permission)", test.c_str()),
base::ConstRef(all_extension_galleries)));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, GetAndClearComparisonCount());
}
@@ -540,7 +540,7 @@ FSInfoMap ProfileState::GetGalleriesInfo(extensions::Extension* extension) {
registry->GetMediaFileSystemsForExtension(
rvh, extension,
base::Bind(&GetGalleryInfoCallback, base::Unretained(&results)));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return results;
}
@@ -588,10 +588,9 @@ int ProfileState::GetAndClearComparisonCount() {
/////////////////////////////////
MediaFileSystemRegistryTest::MediaFileSystemRegistryTest()
- : ui_thread_(content::BrowserThread::UI, MessageLoop::current()),
- file_thread_(content::BrowserThread::FILE, MessageLoop::current()),
- permissions_info_(extensions::ChromeAPIPermissions()) {
-}
+ : ui_thread_(content::BrowserThread::UI, base::MessageLoop::current()),
+ file_thread_(content::BrowserThread::FILE, base::MessageLoop::current()),
+ permissions_info_(extensions::ChromeAPIPermissions()) {}
void MediaFileSystemRegistryTest::CreateProfileState(size_t profile_count) {
for (size_t i = 0; i < profile_count; ++i) {
@@ -627,14 +626,14 @@ std::string MediaFileSystemRegistryTest::AttachDevice(
DCHECK(MediaStorageUtil::IsRemovableDevice(device_id));
string16 name = location.LossyDisplayName();
ProcessAttach(device_id, name, location.value());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return device_id;
}
void MediaFileSystemRegistryTest::DetachDevice(const std::string& device_id) {
DCHECK(MediaStorageUtil::IsRemovableDevice(device_id));
ProcessDetach(device_id);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
void MediaFileSystemRegistryTest::SetGalleryPermission(
@@ -774,7 +773,7 @@ void MediaFileSystemRegistryTest::TearDown() {
g_browser_process->media_file_system_registry();
EXPECT_EQ(0U, registry->GetExtensionGalleriesHostCountForTests());
BrowserThread::GetBlockingPool()->FlushForTesting();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
extensions::ManifestHandler::ClearRegistryForTesting();
}
@@ -876,7 +875,7 @@ TEST_F(MediaFileSystemRegistryTest,
break;
}
}
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(forget_gallery);
EXPECT_EQ(gallery_count, GetAutoAddedGalleries(profile_state).size());

Powered by Google App Engine
This is Rietveld 408576698