summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-07 12:43:32 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-07 12:43:32 +0000
commit4cc586b1495a87a0c47cdd90d63e4211e6f5b830 (patch)
treeb939ab56c815f48cca899f8bce7488e371bf2784
parent8b8809ee49a63333d58c3d009d89508cb8dddce8 (diff)
downloadchromium_src-4cc586b1495a87a0c47cdd90d63e4211e6f5b830.zip
chromium_src-4cc586b1495a87a0c47cdd90d63e4211e6f5b830.tar.gz
chromium_src-4cc586b1495a87a0c47cdd90d63e4211e6f5b830.tar.bz2
webkit: Use base::MessageLoop.
BUG=236029 R=brettw@chromium.org Review URL: https://chromiumcodereview.appspot.com/14520026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198691 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/appcache/appcache_group.cc2
-rw-r--r--webkit/appcache/appcache_group_unittest.cc2
-rw-r--r--webkit/appcache/appcache_host_unittest.cc2
-rw-r--r--webkit/appcache/appcache_quota_client_unittest.cc22
-rw-r--r--webkit/appcache/appcache_request_handler_unittest.cc14
-rw-r--r--webkit/appcache/appcache_response.cc2
-rw-r--r--webkit/appcache/appcache_response_unittest.cc16
-rw-r--r--webkit/appcache/appcache_service.cc2
-rw-r--r--webkit/appcache/appcache_service_unittest.cc31
-rw-r--r--webkit/appcache/appcache_storage_impl.cc6
-rw-r--r--webkit/appcache/appcache_storage_impl_unittest.cc35
-rw-r--r--webkit/appcache/appcache_test_helper.cc8
-rw-r--r--webkit/appcache/appcache_update_job.cc2
-rw-r--r--webkit/appcache/appcache_update_job_unittest.cc119
-rw-r--r--webkit/appcache/appcache_url_request_job.cc2
-rw-r--r--webkit/appcache/appcache_url_request_job_unittest.cc19
-rw-r--r--webkit/appcache/mock_appcache_service.cc5
-rw-r--r--webkit/appcache/mock_appcache_storage.cc2
-rw-r--r--webkit/appcache/mock_appcache_storage_unittest.cc33
-rw-r--r--webkit/blob/blob_url_request_job.cc2
-rw-r--r--webkit/blob/blob_url_request_job_unittest.cc13
-rw-r--r--webkit/blob/local_file_stream_reader_unittest.cc10
-rw-r--r--webkit/blob/shareable_file_reference_unittest.cc6
-rw-r--r--webkit/blob/view_blob_internals_job.cc7
-rw-r--r--webkit/compositor_bindings/test/run_all_unittests.cc2
-rw-r--r--webkit/database/database_connections.cc7
-rw-r--r--webkit/database/database_connections_unittest.cc9
-rw-r--r--webkit/database/database_quota_client_unittest.cc10
-rw-r--r--webkit/database/database_tracker_unittest.cc4
-rw-r--r--webkit/dom_storage/dom_storage_area_unittest.cc29
-rw-r--r--webkit/dom_storage/dom_storage_context_unittest.cc28
-rw-r--r--webkit/fileapi/async_file_test_helper.cc2
-rw-r--r--webkit/fileapi/copy_or_move_file_validator_unittest.cc8
-rw-r--r--webkit/fileapi/file_system_context_unittest.cc2
-rw-r--r--webkit/fileapi/file_system_dir_url_request_job.cc2
-rw-r--r--webkit/fileapi/file_system_dir_url_request_job_unittest.cc12
-rw-r--r--webkit/fileapi/file_system_file_stream_reader_unittest.cc8
-rw-r--r--webkit/fileapi/file_system_mount_point_provider_unittest.cc2
-rw-r--r--webkit/fileapi/file_system_quota_client_unittest.cc18
-rw-r--r--webkit/fileapi/file_system_url_request_job.cc2
-rw-r--r--webkit/fileapi/file_system_url_request_job_unittest.cc16
-rw-r--r--webkit/fileapi/file_system_usage_cache_unittest.cc2
-rw-r--r--webkit/fileapi/file_writer_delegate.cc10
-rw-r--r--webkit/fileapi/file_writer_delegate_unittest.cc32
-rw-r--r--webkit/fileapi/isolated_file_util_unittest.cc2
-rw-r--r--webkit/fileapi/local_file_stream_writer_unittest.cc14
-rw-r--r--webkit/fileapi/local_file_system_cross_operation_unittest.cc4
-rw-r--r--webkit/fileapi/local_file_system_operation_unittest.cc129
-rw-r--r--webkit/fileapi/local_file_system_operation_write_unittest.cc26
-rw-r--r--webkit/fileapi/local_file_system_quota_unittest.cc19
-rw-r--r--webkit/fileapi/local_file_system_test_helper.cc2
-rw-r--r--webkit/fileapi/local_file_util_unittest.cc2
-rw-r--r--webkit/fileapi/obfuscated_file_util_unittest.cc6
-rw-r--r--webkit/fileapi/sandbox_mount_point_provider_unittest.cc4
-rw-r--r--webkit/fileapi/syncable/canned_syncable_file_system.cc20
-rw-r--r--webkit/fileapi/syncable/local_file_change_tracker_unittest.cc7
-rw-r--r--webkit/fileapi/syncable/local_file_sync_context_unittest.cc18
-rw-r--r--webkit/fileapi/syncable/syncable_file_operation_runner_unittest.cc42
-rw-r--r--webkit/fileapi/syncable/syncable_file_system_unittest.cc2
-rw-r--r--webkit/fileapi/syncable/syncable_file_system_util_unittest.cc4
-rw-r--r--webkit/fileapi/upload_file_system_file_element_reader_unittest.cc6
-rw-r--r--webkit/glue/resource_request_body_unittest.cc4
-rw-r--r--webkit/glue/webkit_glue_unittest.cc2
-rw-r--r--webkit/glue/webkitplatformsupport_impl.cc5
-rw-r--r--webkit/glue/webthread_impl.cc18
-rw-r--r--webkit/glue/webthread_impl.h2
-rw-r--r--webkit/glue/weburlloader_impl.cc4
-rw-r--r--webkit/plugins/npapi/plugin_instance.cc8
-rw-r--r--webkit/plugins/npapi/plugin_lib.cc2
-rw-r--r--webkit/plugins/npapi/plugin_stream.cc2
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl.cc2
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl_win.cc23
-rw-r--r--webkit/plugins/npapi/webplugin_impl.cc9
-rw-r--r--webkit/plugins/ppapi/message_channel.cc7
-rw-r--r--webkit/plugins/ppapi/plugin_module.cc7
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc12
-rw-r--r--webkit/plugins/ppapi/ppapi_webplugin_impl.cc2
-rw-r--r--webkit/plugins/ppapi/ppb_flash_message_loop_impl.cc7
-rw-r--r--webkit/plugins/ppapi/ppb_graphics_3d_impl.cc6
-rw-r--r--webkit/plugins/ppapi/ppb_scrollbar_impl.cc2
-rw-r--r--webkit/plugins/ppapi/quota_file_io_unittest.cc32
-rw-r--r--webkit/plugins/webview_plugin.cc2
-rw-r--r--webkit/quota/mock_quota_manager.cc4
-rw-r--r--webkit/quota/mock_quota_manager_unittest.cc16
-rw-r--r--webkit/quota/quota_database_unittest.cc2
-rw-r--r--webkit/quota/quota_manager_unittest.cc418
-rw-r--r--webkit/quota/quota_task.cc2
-rw-r--r--webkit/quota/quota_temporary_storage_evictor_unittest.cc23
-rw-r--r--webkit/quota/usage_tracker_unittest.cc15
-rw-r--r--webkit/support/test_webmessageportchannel.cc5
-rw-r--r--webkit/support/webkit_support.cc32
-rw-r--r--webkit/tools/test_shell/notification_presenter.cc2
-rw-r--r--webkit/tools/test_shell/simple_appcache_system.cc4
-rw-r--r--webkit/tools/test_shell/simple_appcache_system.h16
-rw-r--r--webkit/tools/test_shell/simple_file_system.cc2
-rw-r--r--webkit/tools/test_shell/simple_resource_loader_bridge.cc14
-rw-r--r--webkit/tools/test_shell/simple_socket_stream_bridge.cc20
-rw-r--r--webkit/tools/test_shell/test_shell_devtools_agent.cc12
-rw-r--r--webkit/tools/test_shell/test_shell_devtools_client.cc2
-rw-r--r--webkit/tools/test_shell/test_shell_gtk.cc4
-rw-r--r--webkit/tools/test_shell/test_shell_main.cc4
-rw-r--r--webkit/tools/test_shell/test_shell_test.cc2
-rw-r--r--webkit/tools/test_shell/test_shell_webblobregistry_impl.cc2
-rw-r--r--webkit/tools/test_shell/test_shell_win.cc4
-rw-r--r--webkit/tools/test_shell/test_webview_delegate_gtk.cc2
-rw-r--r--webkit/tools/test_shell/test_webview_delegate_win.cc2
-rw-r--r--webkit/tools/test_shell/webwidget_host.cc2
107 files changed, 831 insertions, 812 deletions
diff --git a/webkit/appcache/appcache_group.cc b/webkit/appcache/appcache_group.cc
index 9186b48..2ac587c 100644
--- a/webkit/appcache/appcache_group.cc
+++ b/webkit/appcache/appcache_group.cc
@@ -228,7 +228,7 @@ void AppCacheGroup::ScheduleUpdateRestart(int delay_ms) {
DCHECK(restart_update_task_.IsCancelled());
restart_update_task_.Reset(
base::Bind(&AppCacheGroup::RunQueuedUpdates, this));
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
restart_update_task_.callback(),
base::TimeDelta::FromMilliseconds(delay_ms));
diff --git a/webkit/appcache/appcache_group_unittest.cc b/webkit/appcache/appcache_group_unittest.cc
index c5cb87b..738a2f1 100644
--- a/webkit/appcache/appcache_group_unittest.cc
+++ b/webkit/appcache/appcache_group_unittest.cc
@@ -97,7 +97,7 @@ class TestAppCacheHost : public AppCacheHost {
class AppCacheGroupTest : public testing::Test {
private:
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
};
TEST_F(AppCacheGroupTest, AddRemoveCache) {
diff --git a/webkit/appcache/appcache_host_unittest.cc b/webkit/appcache/appcache_host_unittest.cc
index 5d27514..fb10f26 100644
--- a/webkit/appcache/appcache_host_unittest.cc
+++ b/webkit/appcache/appcache_host_unittest.cc
@@ -141,7 +141,7 @@ class AppCacheHostTest : public testing::Test {
last_callback_param_ = param;
}
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
// Mock classes for the 'host' to work with
MockAppCacheService service_;
diff --git a/webkit/appcache/appcache_quota_client_unittest.cc b/webkit/appcache/appcache_quota_client_unittest.cc
index 828c0c0..619a389 100644
--- a/webkit/appcache/appcache_quota_client_unittest.cc
+++ b/webkit/appcache/appcache_quota_client_unittest.cc
@@ -44,7 +44,7 @@ class AppCacheQuotaClientTest : public testing::Test {
quota::StorageType type) {
usage_ = -1;
AsyncGetOriginUsage(client, origin, type);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return usage_;
}
@@ -53,7 +53,7 @@ class AppCacheQuotaClientTest : public testing::Test {
quota::StorageType type) {
origins_.clear();
AsyncGetOriginsForType(client, type);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return origins_;
}
@@ -63,7 +63,7 @@ class AppCacheQuotaClientTest : public testing::Test {
const std::string& host) {
origins_.clear();
AsyncGetOriginsForHost(client, type, host);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return origins_;
}
@@ -73,7 +73,7 @@ class AppCacheQuotaClientTest : public testing::Test {
const GURL& origin) {
delete_status_ = quota::kQuotaStatusUnknown;
AsyncDeleteOriginData(client, type, origin);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return delete_status_;
}
@@ -154,7 +154,7 @@ class AppCacheQuotaClientTest : public testing::Test {
delete_status_ = status;
}
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
int64 usage_;
std::set<GURL> origins_;
quota::StorageType type_;
@@ -318,7 +318,7 @@ TEST_F(AppCacheQuotaClientTest, PendingRequests) {
EXPECT_EQ(0, num_get_origin_usage_completions_);
EXPECT_EQ(0, num_get_origins_completions_);
EXPECT_EQ(0, num_delete_origins_completions_);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, num_get_origin_usage_completions_);
EXPECT_EQ(0, num_get_origins_completions_);
EXPECT_EQ(0, num_delete_origins_completions_);
@@ -328,7 +328,7 @@ TEST_F(AppCacheQuotaClientTest, PendingRequests) {
EXPECT_EQ(2, num_get_origin_usage_completions_);
EXPECT_EQ(4, num_get_origins_completions_);
EXPECT_EQ(0, num_delete_origins_completions_);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(3, num_delete_origins_completions_); // deletes are really async
// They should be serviced in order requested.
@@ -357,7 +357,7 @@ TEST_F(AppCacheQuotaClientTest, DestroyServiceWithPending) {
AsyncDeleteOriginData(client, kTemp, kOriginA);
AsyncDeleteOriginData(client, kPerm, kOriginA);
AsyncDeleteOriginData(client, kTemp, kOriginB);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, num_get_origin_usage_completions_);
EXPECT_EQ(0, num_get_origins_completions_);
EXPECT_EQ(0, num_delete_origins_completions_);
@@ -393,7 +393,7 @@ TEST_F(AppCacheQuotaClientTest, DestroyQuotaManagerWithPending) {
AsyncDeleteOriginData(client, kTemp, kOriginA);
AsyncDeleteOriginData(client, kPerm, kOriginA);
AsyncDeleteOriginData(client, kTemp, kOriginB);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, num_get_origin_usage_completions_);
EXPECT_EQ(0, num_get_origins_completions_);
EXPECT_EQ(0, num_delete_origins_completions_);
@@ -403,7 +403,7 @@ TEST_F(AppCacheQuotaClientTest, DestroyQuotaManagerWithPending) {
Call_NotifyAppCacheReady(client);
// Callbacks should be deleted and not called.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, num_get_origin_usage_completions_);
EXPECT_EQ(0, num_get_origins_completions_);
EXPECT_EQ(0, num_delete_origins_completions_);
@@ -428,7 +428,7 @@ TEST_F(AppCacheQuotaClientTest, DestroyWithDeleteInProgress) {
// A real completion callback from the service should
// be dropped if it comes in after NotifyAppCacheDestroyed.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, num_delete_origins_completions_);
EXPECT_EQ(quota::kQuotaErrorAbort, delete_status_);
diff --git a/webkit/appcache/appcache_request_handler_unittest.cc b/webkit/appcache/appcache_request_handler_unittest.cc
index 3dcca48..800c070 100644
--- a/webkit/appcache/appcache_request_handler_unittest.cc
+++ b/webkit/appcache/appcache_request_handler_unittest.cc
@@ -168,7 +168,7 @@ class AppCacheRequestHandlerTest : public testing::Test {
static void SetUpTestCase() {
io_thread_.reset(new base::Thread("AppCacheRequestHandlerTest Thread"));
- base::Thread::Options options(MessageLoop::TYPE_IO, 0);
+ base::Thread::Options options(base::MessageLoop::TYPE_IO, 0);
io_thread_->StartWithOptions(options);
}
@@ -193,7 +193,7 @@ class AppCacheRequestHandlerTest : public testing::Test {
}
void SetUpTest() {
- DCHECK(MessageLoop::current() == io_thread_->message_loop());
+ DCHECK(base::MessageLoop::current() == io_thread_->message_loop());
orig_http_factory_ = net::URLRequest::Deprecated::RegisterProtocolFactory(
"http", MockHttpJobFactory);
mock_service_.reset(new MockAppCacheService);
@@ -211,7 +211,7 @@ class AppCacheRequestHandlerTest : public testing::Test {
}
void TearDownTest() {
- DCHECK(MessageLoop::current() == io_thread_->message_loop());
+ DCHECK(base::MessageLoop::current() == io_thread_->message_loop());
DCHECK(!mock_factory_job_);
net::URLRequest::Deprecated::RegisterProtocolFactory(
"http", orig_http_factory_);
@@ -230,8 +230,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
void TestFinished() {
// We unwind the stack prior to finishing up to let stack
// based objects get deleted.
- DCHECK(MessageLoop::current() == io_thread_->message_loop());
- MessageLoop::current()->PostTask(
+ DCHECK(base::MessageLoop::current() == io_thread_->message_loop());
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&AppCacheRequestHandlerTest::TestFinishedUnwound,
base::Unretained(this)));
@@ -247,12 +247,12 @@ class AppCacheRequestHandlerTest : public testing::Test {
}
void ScheduleNextTask() {
- DCHECK(MessageLoop::current() == io_thread_->message_loop());
+ DCHECK(base::MessageLoop::current() == io_thread_->message_loop());
if (task_stack_.empty()) {
TestFinished();
return;
}
- MessageLoop::current()->PostTask(FROM_HERE, task_stack_.top());
+ base::MessageLoop::current()->PostTask(FROM_HERE, task_stack_.top());
task_stack_.pop();
}
diff --git a/webkit/appcache/appcache_response.cc b/webkit/appcache/appcache_response.cc
index e134acb..fdd0792 100644
--- a/webkit/appcache/appcache_response.cc
+++ b/webkit/appcache/appcache_response.cc
@@ -91,7 +91,7 @@ AppCacheResponseIO::~AppCacheResponseIO() {
}
void AppCacheResponseIO::ScheduleIOCompletionCallback(int result) {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&AppCacheResponseIO::OnIOComplete,
weak_factory_.GetWeakPtr(), result));
}
diff --git a/webkit/appcache/appcache_response_unittest.cc b/webkit/appcache/appcache_response_unittest.cc
index f0d3d5c..9d5e973 100644
--- a/webkit/appcache/appcache_response_unittest.cc
+++ b/webkit/appcache/appcache_response_unittest.cc
@@ -63,7 +63,7 @@ class AppCacheResponseTest : public testing::Test {
static void SetUpTestCase() {
io_thread_.reset(new base::Thread("AppCacheResponseTest Thread"));
- base::Thread::Options options(MessageLoop::TYPE_IO, 0);
+ base::Thread::Options options(base::MessageLoop::TYPE_IO, 0);
io_thread_->StartWithOptions(options);
}
@@ -83,7 +83,7 @@ class AppCacheResponseTest : public testing::Test {
}
void SetUpTest() {
- DCHECK(MessageLoop::current() == io_thread_->message_loop());
+ DCHECK(base::MessageLoop::current() == io_thread_->message_loop());
DCHECK(task_stack_.empty());
storage_delegate_.reset(new MockStorageDelegate(this));
service_.reset(new MockAppCacheService());
@@ -99,7 +99,7 @@ class AppCacheResponseTest : public testing::Test {
}
void TearDownTest() {
- DCHECK(MessageLoop::current() == io_thread_->message_loop());
+ DCHECK(base::MessageLoop::current() == io_thread_->message_loop());
while (!task_stack_.empty())
task_stack_.pop();
@@ -116,8 +116,8 @@ class AppCacheResponseTest : public testing::Test {
void TestFinished() {
// We unwind the stack prior to finishing up to let stack
// based objects get deleted.
- DCHECK(MessageLoop::current() == io_thread_->message_loop());
- MessageLoop::current()->PostTask(
+ DCHECK(base::MessageLoop::current() == io_thread_->message_loop());
+ base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&AppCacheResponseTest::TestFinishedUnwound,
base::Unretained(this)));
}
@@ -136,7 +136,7 @@ class AppCacheResponseTest : public testing::Test {
}
void ScheduleNextTask() {
- DCHECK(MessageLoop::current() == io_thread_->message_loop());
+ DCHECK(base::MessageLoop::current() == io_thread_->message_loop());
if (task_stack_.empty()) {
TestFinished();
return;
@@ -147,7 +147,7 @@ class AppCacheResponseTest : public testing::Test {
if (immediate)
task.Run();
else
- MessageLoop::current()->PostTask(FROM_HERE, task);
+ base::MessageLoop::current()->PostTask(FROM_HERE, task);
}
// Wrappers to call AppCacheResponseReader/Writer Read and Write methods
@@ -641,7 +641,7 @@ class AppCacheResponseTest : public testing::Test {
reader_.reset();
// Wait a moment to verify no callbacks.
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE, base::Bind(&AppCacheResponseTest::VerifyNoCallbacks,
base::Unretained(this)),
base::TimeDelta::FromMilliseconds(10));
diff --git a/webkit/appcache/appcache_service.cc b/webkit/appcache/appcache_service.cc
index 9b9972e..70fed116 100644
--- a/webkit/appcache/appcache_service.cc
+++ b/webkit/appcache/appcache_service.cc
@@ -61,7 +61,7 @@ class AppCacheService::AsyncHelper
void CallCallback(int rv) {
if (!callback_.is_null()) {
// Defer to guarantee async completion.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&DeferredCallback, callback_, rv));
}
callback_.Reset();
diff --git a/webkit/appcache/appcache_service_unittest.cc b/webkit/appcache/appcache_service_unittest.cc
index 30b8825..3ed5d26 100644
--- a/webkit/appcache/appcache_service_unittest.cc
+++ b/webkit/appcache/appcache_service_unittest.cc
@@ -67,8 +67,7 @@ class MockResponseReader : public AppCacheResponseReader {
private:
void ScheduleUserCallback(int result) {
- MessageLoop::current()->PostTask(
- FROM_HERE,
+ base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(&MockResponseReader::InvokeUserCompletionCallback,
weak_factory_.GetWeakPtr(), result));
}
@@ -178,14 +177,14 @@ class AppCacheServiceTest : public testing::Test {
net::CompletionCallback deletion_callback_;
private:
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
};
TEST_F(AppCacheServiceTest, DeleteAppCachesForOrigin) {
// Without giving mock storage simiulated info, should fail.
service_->DeleteAppCachesForOrigin(kOrigin, deletion_callback_);
EXPECT_EQ(0, delete_completion_count_);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, delete_completion_count_);
EXPECT_EQ(net::ERR_FAILED, delete_result_);
delete_completion_count_ = 0;
@@ -194,7 +193,7 @@ TEST_F(AppCacheServiceTest, DeleteAppCachesForOrigin) {
mock_storage()->SimulateGetAllInfo(new AppCacheInfoCollection);
service_->DeleteAppCachesForOrigin(kOrigin, deletion_callback_);
EXPECT_EQ(0, delete_completion_count_);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, delete_completion_count_);
EXPECT_EQ(net::OK, delete_result_);
delete_completion_count_ = 0;
@@ -216,7 +215,7 @@ TEST_F(AppCacheServiceTest, DeleteAppCachesForOrigin) {
mock_storage()->SimulateGetAllInfo(info);
service_->DeleteAppCachesForOrigin(kOrigin, deletion_callback_);
EXPECT_EQ(0, delete_completion_count_);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, delete_completion_count_);
EXPECT_EQ(net::OK, delete_result_);
delete_completion_count_ = 0;
@@ -227,7 +226,7 @@ TEST_F(AppCacheServiceTest, DeleteAppCachesForOrigin) {
mock_storage()->SimulateMakeGroupObsoleteFailure();
service_->DeleteAppCachesForOrigin(kOrigin, deletion_callback_);
EXPECT_EQ(0, delete_completion_count_);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, delete_completion_count_);
EXPECT_EQ(net::ERR_FAILED, delete_result_);
delete_completion_count_ = 0;
@@ -243,7 +242,7 @@ TEST_F(AppCacheServiceTest, DeleteAppCachesForOrigin) {
// Let any tasks lingering from the sudden deletion run and verify
// no other completion calls occur.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, delete_completion_count_);
}
@@ -251,7 +250,7 @@ TEST_F(AppCacheServiceTest, CheckAppCacheResponse) {
// Check a non-existing manifest.
EXPECT_FALSE(IsGroupStored(kManifestUrl));
service_->CheckAppCacheResponse(kManifestUrl, 1, 1);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, CountPendingHelpers());
EXPECT_FALSE(IsGroupStored(kManifestUrl));
ResetStorage();
@@ -262,7 +261,7 @@ TEST_F(AppCacheServiceTest, CheckAppCacheResponse) {
EXPECT_TRUE(IsGroupStored(kManifestUrl));
SetupMockReader(true, true, true);
service_->CheckAppCacheResponse(kManifestUrl, kMockCacheId, kMockResponseId);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, CountPendingHelpers());
EXPECT_TRUE(IsGroupStored(kManifestUrl));
ResetStorage();
@@ -272,7 +271,7 @@ TEST_F(AppCacheServiceTest, CheckAppCacheResponse) {
SetupMockGroup();
service_->CheckAppCacheResponse(kManifestUrl, kMockCacheId,
kMissingResponseId);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, CountPendingHelpers());
EXPECT_FALSE(IsGroupStored(kManifestUrl));
ResetStorage();
@@ -282,7 +281,7 @@ TEST_F(AppCacheServiceTest, CheckAppCacheResponse) {
SetupMockGroup();
service_->CheckAppCacheResponse(kManifestUrl, kMissingCacheId,
kMissingResponseId);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, CountPendingHelpers());
EXPECT_TRUE(IsGroupStored(kManifestUrl));
ResetStorage();
@@ -291,7 +290,7 @@ TEST_F(AppCacheServiceTest, CheckAppCacheResponse) {
SetupMockGroup();
service_->CheckAppCacheResponse(kManifestUrl, kMockCacheId, kMockResponseId);
SetupMockReader(false, true, true);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, CountPendingHelpers());
EXPECT_FALSE(IsGroupStored(kManifestUrl));
ResetStorage();
@@ -300,7 +299,7 @@ TEST_F(AppCacheServiceTest, CheckAppCacheResponse) {
SetupMockGroup();
service_->CheckAppCacheResponse(kManifestUrl, kMockCacheId, kMockResponseId);
SetupMockReader(true, false, true);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, CountPendingHelpers());
EXPECT_FALSE(IsGroupStored(kManifestUrl));
ResetStorage();
@@ -309,13 +308,13 @@ TEST_F(AppCacheServiceTest, CheckAppCacheResponse) {
SetupMockGroup();
service_->CheckAppCacheResponse(kManifestUrl, kMockCacheId, kMockResponseId);
SetupMockReader(true, true, false);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, CountPendingHelpers());
EXPECT_FALSE(IsGroupStored(kManifestUrl));
ResetStorage();
service_.reset(); // Clean up.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
} // namespace appcache
diff --git a/webkit/appcache/appcache_storage_impl.cc b/webkit/appcache/appcache_storage_impl.cc
index 438471d..f0cb69e 100644
--- a/webkit/appcache/appcache_storage_impl.cc
+++ b/webkit/appcache/appcache_storage_impl.cc
@@ -280,7 +280,7 @@ void AppCacheStorageImpl::InitTask::RunCompleted() {
if (!storage_->is_disabled()) {
storage_->usage_map_.swap(usage_map_);
const base::TimeDelta kDelay = base::TimeDelta::FromMinutes(5);
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&AppCacheStorageImpl::DelayedStartDeletingUnusedResponses,
storage_->weak_factory_.GetWeakPtr()),
@@ -1664,7 +1664,7 @@ void AppCacheStorageImpl::StartDeletingResponses(
void AppCacheStorageImpl::ScheduleDeleteOneResponse() {
DCHECK(!is_response_deletion_scheduled_);
const base::TimeDelta kDelay = base::TimeDelta::FromMilliseconds(10);
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&AppCacheStorageImpl::DeleteOneResponse,
weak_factory_.GetWeakPtr()),
@@ -1750,7 +1750,7 @@ void AppCacheStorageImpl::GetPendingForeignMarkingsForCache(
void AppCacheStorageImpl::ScheduleSimpleTask(const base::Closure& task) {
pending_simple_tasks_.push_back(task);
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&AppCacheStorageImpl::RunOnePendingSimpleTask,
weak_factory_.GetWeakPtr()));
diff --git a/webkit/appcache/appcache_storage_impl_unittest.cc b/webkit/appcache/appcache_storage_impl_unittest.cc
index 1c6d976..5e824d1 100644
--- a/webkit/appcache/appcache_storage_impl_unittest.cc
+++ b/webkit/appcache/appcache_storage_impl_unittest.cc
@@ -159,9 +159,11 @@ class AppCacheStorageImplTest : public testing::Test {
EXPECT_EQ(kOrigin, origin);
EXPECT_EQ(quota::kStorageTypeTemporary, type);
if (async_) {
- MessageLoop::current()->PostTask(
- FROM_HERE, base::Bind(&MockQuotaManager::CallCallback,
- base::Unretained(this), callback));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&MockQuotaManager::CallCallback,
+ base::Unretained(this),
+ callback));
return;
}
CallCallback(callback);
@@ -240,14 +242,16 @@ class AppCacheStorageImplTest : public testing::Test {
// We also have to wait for InitTask completion call to be performed
// on the IO thread prior to running the test. Its guaranteed to be
// queued by this time.
- MessageLoop::current()->PostTask(
- FROM_HERE, base::Bind(&AppCacheStorageImplTest::RunMethod<Method>,
- base::Unretained(this), method));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&AppCacheStorageImplTest::RunMethod<Method>,
+ base::Unretained(this),
+ method));
}
static void SetUpTestCase() {
io_thread.reset(new base::Thread("AppCacheTest.IOThread"));
- base::Thread::Options options(MessageLoop::TYPE_IO, 0);
+ base::Thread::Options options(base::MessageLoop::TYPE_IO, 0);
ASSERT_TRUE(io_thread->StartWithOptions(options));
db_thread.reset(new base::Thread("AppCacheTest::DBThread"));
@@ -274,7 +278,7 @@ class AppCacheStorageImplTest : public testing::Test {
}
void SetUpTest() {
- DCHECK(MessageLoop::current() == io_thread->message_loop());
+ DCHECK(base::MessageLoop::current() == io_thread->message_loop());
service_.reset(new AppCacheService(NULL));
service_->Initialize(
base::FilePath(), db_thread->message_loop_proxy(), NULL);
@@ -284,7 +288,7 @@ class AppCacheStorageImplTest : public testing::Test {
}
void TearDownTest() {
- DCHECK(MessageLoop::current() == io_thread->message_loop());
+ DCHECK(base::MessageLoop::current() == io_thread->message_loop());
storage()->CancelDelegateCallbacks(delegate());
group_ = NULL;
cache_ = NULL;
@@ -298,10 +302,11 @@ class AppCacheStorageImplTest : public testing::Test {
void TestFinished() {
// We unwind the stack prior to finishing up to let stack
// based objects get deleted.
- DCHECK(MessageLoop::current() == io_thread->message_loop());
- MessageLoop::current()->PostTask(
- FROM_HERE, base::Bind(&AppCacheStorageImplTest::TestFinishedUnwound,
- base::Unretained(this)));
+ DCHECK(base::MessageLoop::current() == io_thread->message_loop());
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&AppCacheStorageImplTest::TestFinishedUnwound,
+ base::Unretained(this)));
}
void TestFinishedUnwound() {
@@ -314,11 +319,11 @@ class AppCacheStorageImplTest : public testing::Test {
}
void ScheduleNextTask() {
- DCHECK(MessageLoop::current() == io_thread->message_loop());
+ DCHECK(base::MessageLoop::current() == io_thread->message_loop());
if (task_stack_.empty()) {
return;
}
- MessageLoop::current()->PostTask(FROM_HERE, task_stack_.top());
+ base::MessageLoop::current()->PostTask(FROM_HERE, task_stack_.top());
task_stack_.pop();
}
diff --git a/webkit/appcache/appcache_test_helper.cc b/webkit/appcache/appcache_test_helper.cc
index c23c2a6..4970534 100644
--- a/webkit/appcache/appcache_test_helper.cc
+++ b/webkit/appcache/appcache_test_helper.cc
@@ -29,7 +29,7 @@ void AppCacheTestHelper::OnGroupAndNewestCacheStored(
bool success,
bool /*would_exceed_quota*/) {
ASSERT_TRUE(success);
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
void AppCacheTestHelper::AddGroupAndCache(AppCacheService* appcache_service,
@@ -49,7 +49,7 @@ void AppCacheTestHelper::AddGroupAndCache(AppCacheService* appcache_service,
appcache,
this);
// OnGroupAndNewestCacheStored will quit the message loop.
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
void AppCacheTestHelper::GetOriginsWithCaches(AppCacheService* appcache_service,
@@ -61,7 +61,7 @@ void AppCacheTestHelper::GetOriginsWithCaches(AppCacheService* appcache_service,
base::Unretained(this)));
// OnGotAppCacheInfo will quit the message loop.
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
void AppCacheTestHelper::OnGotAppCacheInfo(int rv) {
@@ -73,7 +73,7 @@ void AppCacheTestHelper::OnGotAppCacheInfo(int rv) {
origin != appcache_info_->infos_by_origin.end(); ++origin) {
origins_->insert(origin->first);
}
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
} // namespace appcache
diff --git a/webkit/appcache/appcache_update_job.cc b/webkit/appcache/appcache_update_job.cc
index 0aa5b2f..2c00caf 100644
--- a/webkit/appcache/appcache_update_job.cc
+++ b/webkit/appcache/appcache_update_job.cc
@@ -1343,7 +1343,7 @@ void AppCacheUpdateJob::DeleteSoon() {
group_->SetUpdateStatus(AppCacheGroup::IDLE);
group_ = NULL;
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
} // namespace appcache
diff --git a/webkit/appcache/appcache_update_job_unittest.cc b/webkit/appcache/appcache_update_job_unittest.cc
index b90e783..e6ec588 100644
--- a/webkit/appcache/appcache_update_job_unittest.cc
+++ b/webkit/appcache/appcache_update_job_unittest.cc
@@ -601,7 +601,7 @@ class AppCacheUpdateJobTest : public testing::Test,
tested_manifest_(NONE),
tested_manifest_path_override_(NULL) {
io_thread_.reset(new IOThread("AppCacheUpdateJob IO test thread"));
- base::Thread::Options options(MessageLoop::TYPE_IO, 0);
+ base::Thread::Options options(base::MessageLoop::TYPE_IO, 0);
io_thread_->StartWithOptions(options);
}
@@ -618,7 +618,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void StartCacheAttemptTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(service_->storage(), GURL("http://failme"),
@@ -651,7 +651,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void StartUpgradeAttemptTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
{
MakeService();
@@ -717,7 +717,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void CacheAttemptFetchManifestFailTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(service_->storage(), GURL("http://failme"),
@@ -743,7 +743,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void UpgradeFetchManifestFailTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(service_->storage(), GURL("http://failme"),
@@ -780,7 +780,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void ManifestRedirectTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
net::URLRequestJobFactoryImpl* new_factory(
new net::URLRequestJobFactoryImpl);
@@ -809,7 +809,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void ManifestMissingMimeTypeTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -846,7 +846,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void ManifestNotFoundTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -882,7 +882,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void ManifestGoneTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -907,7 +907,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void CacheAttemptNotModifiedTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -932,7 +932,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void UpgradeNotModifiedTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -968,7 +968,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void UpgradeManifestDataUnchangedTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -1016,7 +1016,7 @@ class AppCacheUpdateJobTest : public testing::Test,
// See http://code.google.com/p/chromium/issues/detail?id=95101
void Bug95101Test() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -1061,7 +1061,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void BasicCacheAttemptSuccessTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
GURL manifest_url = MockHttpServer::GetMockUrl("files/manifest1");
@@ -1089,9 +1089,9 @@ class AppCacheUpdateJobTest : public testing::Test,
void DownloadInterceptEntriesTest() {
// Ensures we download intercept entries too.
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
- GURL manifest_url = MockHttpServer::GetMockUrl(
- "files/manifest-with-intercept");
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
+ GURL manifest_url =
+ MockHttpServer::GetMockUrl("files/manifest-with-intercept");
MakeService();
group_ = new AppCacheGroup(
service_->storage(), manifest_url,
@@ -1115,7 +1115,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void BasicUpgradeSuccessTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -1174,7 +1174,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void UpgradeLoadFromNewestCacheTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -1236,7 +1236,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void UpgradeNoLoadFromNewestCacheTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -1295,7 +1295,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void UpgradeLoadFromNewestCacheVaryHeaderTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -1354,7 +1354,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void UpgradeSuccessMergedTypesTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(service_->storage(),
@@ -1404,7 +1404,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void CacheAttemptFailUrlFetchTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(service_->storage(),
@@ -1429,7 +1429,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void UpgradeFailUrlFetchTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(service_->storage(),
@@ -1469,7 +1469,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void UpgradeFailMasterUrlFetchTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
tested_manifest_path_override_ = "files/manifest1-with-notmodified";
@@ -1564,7 +1564,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void EmptyManifestTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -1607,7 +1607,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void EmptyFileTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(service_->storage(),
@@ -1641,7 +1641,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void RetryRequestTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
// Set some large number of times to return retry.
// Expect 1 manifest fetch and 3 retries.
@@ -1674,7 +1674,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void RetryNoRetryAfterTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
// Set some large number of times to return retry.
// Expect 1 manifest fetch and 0 retries.
@@ -1707,7 +1707,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void RetryNonzeroRetryAfterTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
// Set some large number of times to return retry.
// Expect 1 request and 0 retry attempts.
@@ -1741,7 +1741,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void RetrySuccessTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
// Set 2 as the retry limit (does not exceed the max).
// Expect 1 manifest fetch, 2 retries, 1 url fetch, 1 manifest refetch.
@@ -1774,7 +1774,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void RetryUrlTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
// Set 1 as the retry limit (does not exceed the max).
// Expect 1 manifest fetch, 1 url fetch, 1 url retry, 1 manifest refetch.
@@ -1806,7 +1806,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void FailStoreNewestCacheTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
MockAppCacheStorage* storage =
@@ -1834,7 +1834,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void UpgradeFailStoreNewestCacheTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
MockAppCacheStorage* storage =
@@ -1879,7 +1879,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void MasterEntryFailStoreNewestCacheTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
MockAppCacheStorage* storage =
@@ -1929,7 +1929,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void UpgradeFailMakeGroupObsoleteTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
MockAppCacheStorage* storage =
@@ -1969,7 +1969,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void MasterEntryFetchManifestFailTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(service_->storage(), GURL("http://failme"), 111);
@@ -1996,7 +1996,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void MasterEntryBadManifestTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(service_->storage(),
@@ -2022,7 +2022,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void MasterEntryManifestNotFoundTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -2051,7 +2051,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void MasterEntryFailUrlFetchTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(service_->storage(),
@@ -2081,7 +2081,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void MasterEntryAllFailTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -2122,7 +2122,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void UpgradeMasterEntryAllFailTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -2176,7 +2176,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void MasterEntrySomeFailTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -2223,7 +2223,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void UpgradeMasterEntrySomeFailTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -2282,7 +2282,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void MasterEntryNoUpdateTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(service_->storage(),
@@ -2335,7 +2335,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void StartUpdateMidCacheAttemptTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -2421,7 +2421,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void StartUpdateMidNoUpdateTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -2501,7 +2501,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void StartUpdateMidDownloadTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -2585,7 +2585,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void QueueMasterEntryTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
MakeService();
group_ = new AppCacheGroup(
@@ -2634,7 +2634,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void IfModifiedSinceTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
net::URLRequestJobFactoryImpl* new_factory(
new net::URLRequestJobFactoryImpl);
@@ -2702,7 +2702,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void IfModifiedSinceUpgradeTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
HttpHeadersRequestTestJob::Initialize("Sat, 29 Oct 1994 19:43:31 GMT",
std::string());
@@ -2765,7 +2765,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void IfNoneMatchUpgradeTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
HttpHeadersRequestTestJob::Initialize(std::string(), "\"LadeDade\"");
net::URLRequestJobFactoryImpl* new_factory(
@@ -2827,7 +2827,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void IfNoneMatchRefetchTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
HttpHeadersRequestTestJob::Initialize(std::string(), "\"LadeDade\"");
net::URLRequestJobFactoryImpl* new_factory(
@@ -2862,7 +2862,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void MultipleHeadersRefetchTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
// Verify that code is correct when building multiple extra headers.
HttpHeadersRequestTestJob::Initialize(
@@ -2900,7 +2900,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void CrossOriginHttpsSuccessTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
GURL manifest_url = MockHttpServer::GetMockHttpsUrl(
"files/valid_cross_origin_https_manifest");
@@ -2927,7 +2927,7 @@ class AppCacheUpdateJobTest : public testing::Test,
}
void CrossOriginHttpsDeniedTest() {
- ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
+ ASSERT_EQ(base::MessageLoop::TYPE_IO, base::MessageLoop::current()->type());
GURL manifest_url = MockHttpServer::GetMockHttpsUrl(
"files/invalid_cross_origin_https_manifest");
@@ -2969,9 +2969,10 @@ class AppCacheUpdateJobTest : public testing::Test,
void UpdateFinished() {
// We unwind the stack prior to finishing up to let stack-based objects
// get deleted.
- MessageLoop::current()->PostTask(
- FROM_HERE, base::Bind(&AppCacheUpdateJobTest::UpdateFinishedUnwound,
- base::Unretained(this)));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&AppCacheUpdateJobTest::UpdateFinishedUnwound,
+ base::Unretained(this)));
}
void UpdateFinishedUnwound() {
diff --git a/webkit/appcache/appcache_url_request_job.cc b/webkit/appcache/appcache_url_request_job.cc
index 92f76d8..28e12fd 100644
--- a/webkit/appcache/appcache_url_request_job.cc
+++ b/webkit/appcache/appcache_url_request_job.cc
@@ -71,7 +71,7 @@ void AppCacheURLRequestJob::MaybeBeginDelivery() {
if (has_been_started() && has_delivery_orders()) {
// Start asynchronously so that all error reporting and data
// callbacks happen as they would for network requests.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&AppCacheURLRequestJob::BeginDelivery,
weak_factory_.GetWeakPtr()));
diff --git a/webkit/appcache/appcache_url_request_job_unittest.cc b/webkit/appcache/appcache_url_request_job_unittest.cc
index 52fe7ee..ec0ca46 100644
--- a/webkit/appcache/appcache_url_request_job_unittest.cc
+++ b/webkit/appcache/appcache_url_request_job_unittest.cc
@@ -153,7 +153,7 @@ class AppCacheURLRequestJobTest : public testing::Test {
static void SetUpTestCase() {
io_thread_.reset(new base::Thread("AppCacheURLRequestJobTest Thread"));
- base::Thread::Options options(MessageLoop::TYPE_IO, 0);
+ base::Thread::Options options(base::MessageLoop::TYPE_IO, 0);
io_thread_->StartWithOptions(options);
}
@@ -173,7 +173,7 @@ class AppCacheURLRequestJobTest : public testing::Test {
}
void SetUpTest() {
- DCHECK(MessageLoop::current() == io_thread_->message_loop());
+ DCHECK(base::MessageLoop::current() == io_thread_->message_loop());
DCHECK(task_stack_.empty());
orig_http_factory_ = net::URLRequest::Deprecated::RegisterProtocolFactory(
"http", MockHttpJobFactory);
@@ -188,9 +188,9 @@ class AppCacheURLRequestJobTest : public testing::Test {
}
void TearDownTest() {
- DCHECK(MessageLoop::current() == io_thread_->message_loop());
- net::URLRequest::Deprecated::RegisterProtocolFactory(
- "http", orig_http_factory_);
+ DCHECK(base::MessageLoop::current() == io_thread_->message_loop());
+ net::URLRequest::Deprecated::RegisterProtocolFactory("http",
+ orig_http_factory_);
orig_http_factory_ = NULL;
request_.reset();
url_request_delegate_.reset();
@@ -212,8 +212,9 @@ class AppCacheURLRequestJobTest : public testing::Test {
void TestFinished() {
// We unwind the stack prior to finishing up to let stack
// based objects get deleted.
- DCHECK(MessageLoop::current() == io_thread_->message_loop());
- MessageLoop::current()->PostTask(FROM_HERE,
+ DCHECK(base::MessageLoop::current() == io_thread_->message_loop());
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
base::Bind(&AppCacheURLRequestJobTest::TestFinishedUnwound,
base::Unretained(this)));
}
@@ -232,7 +233,7 @@ class AppCacheURLRequestJobTest : public testing::Test {
}
void ScheduleNextTask() {
- DCHECK(MessageLoop::current() == io_thread_->message_loop());
+ DCHECK(base::MessageLoop::current() == io_thread_->message_loop());
if (task_stack_.empty()) {
TestFinished();
return;
@@ -243,7 +244,7 @@ class AppCacheURLRequestJobTest : public testing::Test {
if (immediate)
task.Run();
else
- MessageLoop::current()->PostTask(FROM_HERE, task);
+ base::MessageLoop::current()->PostTask(FROM_HERE, task);
}
// Wrappers to call AppCacheResponseReader/Writer Read and Write methods
diff --git a/webkit/appcache/mock_appcache_service.cc b/webkit/appcache/mock_appcache_service.cc
index 56c66ba..792d774 100644
--- a/webkit/appcache/mock_appcache_service.cc
+++ b/webkit/appcache/mock_appcache_service.cc
@@ -17,9 +17,10 @@ static void DeferredCallCallback(
void MockAppCacheService::DeleteAppCachesForOrigin(
const GURL& origin, const net::CompletionCallback& callback) {
++delete_called_count_;
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
- base::Bind(&DeferredCallCallback, callback,
+ base::Bind(&DeferredCallCallback,
+ callback,
mock_delete_appcaches_for_origin_result_));
}
diff --git a/webkit/appcache/mock_appcache_storage.cc b/webkit/appcache/mock_appcache_storage.cc
index df316cf..6c7c431 100644
--- a/webkit/appcache/mock_appcache_storage.cc
+++ b/webkit/appcache/mock_appcache_storage.cc
@@ -442,7 +442,7 @@ void MockAppCacheStorage::ProcessMakeGroupObsolete(
void MockAppCacheStorage::ScheduleTask(const base::Closure& task) {
pending_tasks_.push_back(task);
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&MockAppCacheStorage::RunOnePendingTask,
weak_factory_.GetWeakPtr()));
diff --git a/webkit/appcache/mock_appcache_storage_unittest.cc b/webkit/appcache/mock_appcache_storage_unittest.cc
index 351e340..008d0de 100644
--- a/webkit/appcache/mock_appcache_storage_unittest.cc
+++ b/webkit/appcache/mock_appcache_storage_unittest.cc
@@ -77,10 +77,9 @@ class MockAppCacheStorageTest : public testing::Test {
};
private:
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
};
-
TEST_F(MockAppCacheStorageTest, LoadCache_Miss) {
// Attempt to load a cache that doesn't exist. Should
// complete asyncly.
@@ -88,7 +87,7 @@ TEST_F(MockAppCacheStorageTest, LoadCache_Miss) {
MockStorageDelegate delegate;
service.storage()->LoadCache(111, &delegate);
EXPECT_NE(111, delegate.loaded_cache_id_);
- MessageLoop::current()->RunUntilIdle(); // Do async task execution.
+ base::MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(111, delegate.loaded_cache_id_);
EXPECT_FALSE(delegate.loaded_cache_);
}
@@ -122,7 +121,7 @@ TEST_F(MockAppCacheStorageTest, CreateGroup) {
service.storage()->LoadOrCreateGroup(manifest_url, &delegate);
EXPECT_NE(manifest_url, delegate.loaded_manifest_url_);
EXPECT_FALSE(delegate.loaded_group_.get());
- MessageLoop::current()->RunUntilIdle(); // Do async task execution.
+ base::MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(manifest_url, delegate.loaded_manifest_url_);
EXPECT_TRUE(delegate.loaded_group_.get());
EXPECT_TRUE(delegate.loaded_group_->HasOneRef());
@@ -141,7 +140,7 @@ TEST_F(MockAppCacheStorageTest, LoadGroup_NearHit) {
// to be "unstored" and "currently in use".
GURL manifest_url("http://blah/");
service.storage()->LoadOrCreateGroup(manifest_url, &delegate);
- MessageLoop::current()->RunUntilIdle(); // Do async task execution.
+ base::MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(manifest_url, delegate.loaded_manifest_url_);
EXPECT_TRUE(delegate.loaded_group_.get());
@@ -193,7 +192,7 @@ TEST_F(MockAppCacheStorageTest, LoadGroupAndCache_FarHit) {
storage->LoadCache(cache_id, &delegate);
EXPECT_NE(cache_id, delegate.loaded_cache_id_);
EXPECT_NE(cache_ptr, delegate.loaded_cache_.get());
- MessageLoop::current()->RunUntilIdle(); // Do async task execution.
+ base::MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(cache_id, delegate.loaded_cache_id_);
EXPECT_EQ(cache_ptr, delegate.loaded_cache_.get());
delegate.loaded_cache_ = NULL;
@@ -204,7 +203,7 @@ TEST_F(MockAppCacheStorageTest, LoadGroupAndCache_FarHit) {
storage->LoadOrCreateGroup(manifest_url, &delegate);
EXPECT_NE(manifest_url, delegate.loaded_manifest_url_);
EXPECT_FALSE(delegate.loaded_group_.get());
- MessageLoop::current()->RunUntilIdle(); // Do async task execution.
+ base::MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(manifest_url, delegate.loaded_manifest_url_);
EXPECT_EQ(group_ptr, delegate.loaded_group_.get());
}
@@ -233,7 +232,7 @@ TEST_F(MockAppCacheStorageTest, StoreNewGroup) {
EXPECT_FALSE(delegate.stored_group_success_);
EXPECT_TRUE(storage->stored_caches_.empty());
EXPECT_TRUE(storage->stored_groups_.empty());
- MessageLoop::current()->RunUntilIdle(); // Do async task execution.
+ base::MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_TRUE(delegate.stored_group_success_);
EXPECT_FALSE(storage->stored_caches_.empty());
EXPECT_FALSE(storage->stored_groups_.empty());
@@ -276,7 +275,7 @@ TEST_F(MockAppCacheStorageTest, StoreExistingGroup) {
EXPECT_EQ(size_t(1), storage->stored_groups_.size());
EXPECT_TRUE(storage->IsCacheStored(old_cache));
EXPECT_FALSE(storage->IsCacheStored(new_cache));
- MessageLoop::current()->RunUntilIdle(); // Do async task execution.
+ base::MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_TRUE(delegate.stored_group_success_);
EXPECT_EQ(size_t(1), storage->stored_caches_.size());
EXPECT_EQ(size_t(1), storage->stored_groups_.size());
@@ -319,7 +318,7 @@ TEST_F(MockAppCacheStorageTest, StoreExistingGroupExistingCache) {
EXPECT_FALSE(delegate.stored_group_success_);
EXPECT_EQ(size_t(1), storage->stored_caches_.size());
EXPECT_EQ(size_t(1), storage->stored_groups_.size());
- MessageLoop::current()->RunUntilIdle(); // Do async task execution.
+ base::MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_TRUE(delegate.stored_group_success_);
EXPECT_EQ(size_t(1), storage->stored_caches_.size());
EXPECT_EQ(size_t(1), storage->stored_groups_.size());
@@ -360,7 +359,7 @@ TEST_F(MockAppCacheStorageTest, MakeGroupObsolete) {
EXPECT_EQ(size_t(1), storage->stored_groups_.size());
EXPECT_FALSE(cache->HasOneRef());
EXPECT_FALSE(group->HasOneRef());
- MessageLoop::current()->RunUntilIdle(); // Do async task execution.
+ base::MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_TRUE(delegate.obsoleted_success_);
EXPECT_EQ(group.get(), delegate.obsoleted_group_.get());
EXPECT_TRUE(group->is_obsolete());
@@ -405,7 +404,7 @@ TEST_F(MockAppCacheStorageTest, FindNoMainResponse) {
EXPECT_NE(url, delegate.found_url_);
storage->FindResponseForMainRequest(url, GURL(), &delegate);
EXPECT_NE(url, delegate.found_url_);
- MessageLoop::current()->RunUntilIdle(); // Do async task execution.
+ base::MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(url, delegate.found_url_);
EXPECT_TRUE(delegate.found_manifest_url_.is_empty());
EXPECT_EQ(kNoCacheId, delegate.found_cache_id_);
@@ -442,7 +441,7 @@ TEST_F(MockAppCacheStorageTest, BasicFindMainResponse) {
EXPECT_NE(kEntryUrl, delegate.found_url_);
storage->FindResponseForMainRequest(kEntryUrl, GURL(), &delegate);
EXPECT_NE(kEntryUrl, delegate.found_url_);
- MessageLoop::current()->RunUntilIdle(); // Do async task execution.
+ base::MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(kEntryUrl, delegate.found_url_);
EXPECT_EQ(kManifestUrl, delegate.found_manifest_url_);
EXPECT_EQ(kCacheId, delegate.found_cache_id_);
@@ -499,7 +498,7 @@ TEST_F(MockAppCacheStorageTest, BasicFindMainFallbackResponse) {
EXPECT_NE(kTestUrl, delegate.found_url_);
storage->FindResponseForMainRequest(kTestUrl, GURL(), &delegate);
EXPECT_NE(kTestUrl, delegate.found_url_);
- MessageLoop::current()->RunUntilIdle(); // Do async task execution.
+ base::MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(kTestUrl, delegate.found_url_);
EXPECT_EQ(kManifestUrl, delegate.found_manifest_url_);
EXPECT_EQ(kCacheId, delegate.found_cache_id_);
@@ -556,7 +555,7 @@ TEST_F(MockAppCacheStorageTest, FindMainResponseWithMultipleCandidates) {
EXPECT_NE(kEntryUrl, delegate.found_url_);
storage->FindResponseForMainRequest(kEntryUrl, GURL(), &delegate);
EXPECT_NE(kEntryUrl, delegate.found_url_);
- MessageLoop::current()->RunUntilIdle(); // Do async task execution.
+ base::MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(kEntryUrl, delegate.found_url_);
EXPECT_EQ(kManifestUrl2, delegate.found_manifest_url_);
EXPECT_EQ(kCacheId2, delegate.found_cache_id_);
@@ -603,7 +602,7 @@ TEST_F(MockAppCacheStorageTest, FindMainResponseExclusions) {
EXPECT_NE(kEntryUrl, delegate.found_url_);
storage->FindResponseForMainRequest(kEntryUrl, GURL(), &delegate);
EXPECT_NE(kEntryUrl, delegate.found_url_);
- MessageLoop::current()->RunUntilIdle(); // Do async task execution.
+ base::MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(kEntryUrl, delegate.found_url_);
EXPECT_TRUE(delegate.found_manifest_url_.is_empty());
EXPECT_EQ(kNoCacheId, delegate.found_cache_id_);
@@ -617,7 +616,7 @@ TEST_F(MockAppCacheStorageTest, FindMainResponseExclusions) {
EXPECT_NE(kOnlineNamespaceUrl, delegate.found_url_);
storage->FindResponseForMainRequest(kOnlineNamespaceUrl, GURL(), &delegate);
EXPECT_NE(kOnlineNamespaceUrl, delegate.found_url_);
- MessageLoop::current()->RunUntilIdle(); // Do async task execution.
+ base::MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(kOnlineNamespaceUrl, delegate.found_url_);
EXPECT_TRUE(delegate.found_manifest_url_.is_empty());
EXPECT_EQ(kNoCacheId, delegate.found_cache_id_);
diff --git a/webkit/blob/blob_url_request_job.cc b/webkit/blob/blob_url_request_job.cc
index 3e06735..929500e 100644
--- a/webkit/blob/blob_url_request_job.cc
+++ b/webkit/blob/blob_url_request_job.cc
@@ -85,7 +85,7 @@ BlobURLRequestJob::BlobURLRequestJob(
void BlobURLRequestJob::Start() {
// Continue asynchronously.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&BlobURLRequestJob::DidStart, weak_factory_.GetWeakPtr()));
}
diff --git a/webkit/blob/blob_url_request_job_unittest.cc b/webkit/blob/blob_url_request_job_unittest.cc
index 12ef885..d5af1d4 100644
--- a/webkit/blob/blob_url_request_job_unittest.cc
+++ b/webkit/blob/blob_url_request_job_unittest.cc
@@ -104,7 +104,7 @@ class BlobURLRequestJobTest : public testing::Test {
}
void RequestComplete() {
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
scoped_refptr<net::IOBuffer> received_data_;
@@ -133,10 +133,9 @@ class BlobURLRequestJobTest : public testing::Test {
};
BlobURLRequestJobTest()
- : message_loop_(MessageLoop::TYPE_IO),
+ : message_loop_(base::MessageLoop::TYPE_IO),
blob_data_(new BlobData()),
- expected_status_code_(0) {
- }
+ expected_status_code_(0) {}
virtual void SetUp() {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
@@ -176,7 +175,7 @@ class BlobURLRequestJobTest : public testing::Test {
true, // create
base::Bind(&BlobURLRequestJobTest::OnValidateFileSystem,
base::Unretained(this)));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_TRUE(file_system_root_url_.is_valid());
// Prepare files on file system.
@@ -263,7 +262,7 @@ class BlobURLRequestJobTest : public testing::Test {
request_->SetExtraRequestHeaders(extra_headers);
request_->Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Verify response.
EXPECT_TRUE(request_->status().is_success());
@@ -301,7 +300,7 @@ class BlobURLRequestJobTest : public testing::Test {
base::Time temp_file_system_file_modification_time1_;
base::Time temp_file_system_file_modification_time2_;
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
scoped_refptr<fileapi::FileSystemContext> file_system_context_;
scoped_refptr<BlobData> blob_data_;
net::URLRequestJobFactoryImpl url_request_job_factory_;
diff --git a/webkit/blob/local_file_stream_reader_unittest.cc b/webkit/blob/local_file_stream_reader_unittest.cc
index d5ea2a0..41a3d91 100644
--- a/webkit/blob/local_file_stream_reader_unittest.cc
+++ b/webkit/blob/local_file_stream_reader_unittest.cc
@@ -52,7 +52,7 @@ void NeverCalled(int) { ADD_FAILURE(); }
void EmptyCallback() {}
void QuitLoop() {
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
} // namespace
@@ -60,7 +60,7 @@ void QuitLoop() {
class LocalFileStreamReaderTest : public testing::Test {
public:
LocalFileStreamReaderTest()
- : message_loop_(MessageLoop::TYPE_IO),
+ : message_loop_(base::MessageLoop::TYPE_IO),
file_thread_("FileUtilProxyTestFileThread") {}
virtual void SetUp() OVERRIDE {
@@ -75,7 +75,7 @@ class LocalFileStreamReaderTest : public testing::Test {
virtual void TearDown() OVERRIDE {
// Give another chance for deleted streams to perform Close.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
file_thread_.Stop();
}
@@ -112,11 +112,11 @@ class LocalFileStreamReaderTest : public testing::Test {
void EnsureFileTaskFinished() {
file_task_runner()->PostTaskAndReply(
FROM_HERE, base::Bind(&EmptyCallback), base::Bind(&QuitLoop));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
private:
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
base::Thread file_thread_;
base::ScopedTempDir dir_;
base::Time test_file_modification_time_;
diff --git a/webkit/blob/shareable_file_reference_unittest.cc b/webkit/blob/shareable_file_reference_unittest.cc
index 15b6eb1..79b9d14 100644
--- a/webkit/blob/shareable_file_reference_unittest.cc
+++ b/webkit/blob/shareable_file_reference_unittest.cc
@@ -13,7 +13,7 @@
namespace webkit_blob {
TEST(ShareableFileReferenceTest, TestReferences) {
- MessageLoop message_loop;
+ base::MessageLoop message_loop;
scoped_refptr<base::MessageLoopProxy> loop_proxy =
base::MessageLoopProxy::current();
base::ScopedTempDir temp_dir;
@@ -44,13 +44,13 @@ TEST(ShareableFileReferenceTest, TestReferences) {
// Drop the first reference, the file and reference should still be there.
reference1 = NULL;
EXPECT_TRUE(ShareableFileReference::Get(file).get());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(file_util::PathExists(file));
// Drop the second reference, the file and reference should get deleted.
reference2 = NULL;
EXPECT_FALSE(ShareableFileReference::Get(file).get());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(file_util::PathExists(file));
// TODO(michaeln): add a test for files that aren't deletable behavior.
diff --git a/webkit/blob/view_blob_internals_job.cc b/webkit/blob/view_blob_internals_job.cc
index 80b263e..e2b38db 100644
--- a/webkit/blob/view_blob_internals_job.cc
+++ b/webkit/blob/view_blob_internals_job.cc
@@ -110,9 +110,10 @@ ViewBlobInternalsJob::~ViewBlobInternalsJob() {
}
void ViewBlobInternalsJob::Start() {
- MessageLoop::current()->PostTask(
- FROM_HERE, base::Bind(&ViewBlobInternalsJob::DoWorkAsync,
- weak_factory_.GetWeakPtr()));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&ViewBlobInternalsJob::DoWorkAsync,
+ weak_factory_.GetWeakPtr()));
}
bool ViewBlobInternalsJob::IsRedirectResponse(GURL* location,
diff --git a/webkit/compositor_bindings/test/run_all_unittests.cc b/webkit/compositor_bindings/test/run_all_unittests.cc
index 4ea8697..b6a7105 100644
--- a/webkit/compositor_bindings/test/run_all_unittests.cc
+++ b/webkit/compositor_bindings/test/run_all_unittests.cc
@@ -9,7 +9,7 @@
int main(int argc, char** argv) {
::testing::InitGoogleMock(&argc, argv);
TestSuite test_suite(argc, argv);
- MessageLoop message_loop;
+ base::MessageLoop message_loop;
int result = test_suite.Run();
return result;
diff --git a/webkit/database/database_connections.cc b/webkit/database/database_connections.cc
index f2c19a1..d090350 100644
--- a/webkit/database/database_connections.cc
+++ b/webkit/database/database_connections.cc
@@ -134,8 +134,9 @@ void DatabaseConnectionsWrapper::WaitForAllDatabasesToClose() {
DCHECK(main_thread_->BelongsToCurrentThread());
if (HasOpenConnections()) {
base::AutoReset<bool> auto_reset(&waiting_for_dbs_to_close_, true);
- MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
- MessageLoop::current()->Run();
+ base::MessageLoop::ScopedNestableTaskAllower allow(
+ base::MessageLoop::current());
+ base::MessageLoop::current()->Run();
}
}
@@ -168,7 +169,7 @@ void DatabaseConnectionsWrapper::RemoveOpenConnection(
base::AutoLock auto_lock(open_connections_lock_);
open_connections_.RemoveConnection(origin_identifier, database_name);
if (waiting_for_dbs_to_close_ && open_connections_.IsEmpty())
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
} // namespace webkit_database
diff --git a/webkit/database/database_connections_unittest.cc b/webkit/database/database_connections_unittest.cc
index 1443f12..4a7b841 100644
--- a/webkit/database/database_connections_unittest.cc
+++ b/webkit/database/database_connections_unittest.cc
@@ -100,9 +100,8 @@ TEST(DatabaseConnectionsTest, DatabaseConnectionsWrapperTest) {
const base::string16 kOriginId(ASCIIToUTF16("origin_id"));
const base::string16 kName(ASCIIToUTF16("database_name"));
- MessageLoop message_loop;
- scoped_refptr<DatabaseConnectionsWrapper> obj(
- new DatabaseConnectionsWrapper);
+ base::MessageLoop message_loop;
+ scoped_refptr<DatabaseConnectionsWrapper> obj(new DatabaseConnectionsWrapper);
EXPECT_FALSE(obj->HasOpenConnections());
obj->AddOpenConnection(kOriginId, kName);
EXPECT_TRUE(obj->HasOpenConnections());
@@ -118,7 +117,7 @@ TEST(DatabaseConnectionsTest, DatabaseConnectionsWrapperTest) {
// being removed on the current thread.
obj->AddOpenConnection(kOriginId, kName);
bool did_task_execute = false;
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&RemoveConnectionTask, kOriginId, kName, obj,
&did_task_execute));
@@ -132,7 +131,7 @@ TEST(DatabaseConnectionsTest, DatabaseConnectionsWrapperTest) {
base::Thread thread("WrapperTestThread");
thread.Start();
did_task_execute = false;
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&ScheduleRemoveConnectionTask, &thread, kOriginId, kName, obj,
&did_task_execute));
diff --git a/webkit/database/database_quota_client_unittest.cc b/webkit/database/database_quota_client_unittest.cc
index 86a0891..8a1b174 100644
--- a/webkit/database/database_quota_client_unittest.cc
+++ b/webkit/database/database_quota_client_unittest.cc
@@ -141,7 +141,7 @@ class DatabaseQuotaClientTest : public testing::Test {
origin, type,
base::Bind(&DatabaseQuotaClientTest::OnGetOriginUsageComplete,
weak_factory_.GetWeakPtr()));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return usage_;
}
@@ -153,7 +153,7 @@ class DatabaseQuotaClientTest : public testing::Test {
type,
base::Bind(&DatabaseQuotaClientTest::OnGetOriginsComplete,
weak_factory_.GetWeakPtr()));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return origins_;
}
@@ -166,7 +166,7 @@ class DatabaseQuotaClientTest : public testing::Test {
type, host,
base::Bind(&DatabaseQuotaClientTest::OnGetOriginsComplete,
weak_factory_.GetWeakPtr()));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return origins_;
}
@@ -179,7 +179,7 @@ class DatabaseQuotaClientTest : public testing::Test {
origin, type,
base::Bind(&DatabaseQuotaClientTest::OnDeleteOriginDataComplete,
weak_factory_.GetWeakPtr()));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return delete_status_ == quota::kQuotaStatusOk;
}
@@ -201,7 +201,7 @@ class DatabaseQuotaClientTest : public testing::Test {
delete_status_ = status;
}
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
int64 usage_;
std::set<GURL> origins_;
quota::StorageType type_;
diff --git a/webkit/database/database_tracker_unittest.cc b/webkit/database/database_tracker_unittest.cc
index 44e86f7..4dd09e3 100644
--- a/webkit/database/database_tracker_unittest.cc
+++ b/webkit/database/database_tracker_unittest.cc
@@ -543,7 +543,7 @@ class DatabaseTracker_TestHelper_Test {
const base::string16 kDescription = ASCIIToUTF16("database_description");
// Initialize the tracker database.
- MessageLoop message_loop;
+ base::MessageLoop message_loop;
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
base::FilePath origin1_db_dir;
@@ -621,7 +621,7 @@ class DatabaseTracker_TestHelper_Test {
const base::string16 kDescription = ASCIIToUTF16("database_description");
// Initialize the tracker database.
- MessageLoop message_loop;
+ base::MessageLoop message_loop;
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
base::FilePath origin1_db_dir;
diff --git a/webkit/dom_storage/dom_storage_area_unittest.cc b/webkit/dom_storage/dom_storage_area_unittest.cc
index 6a051bc..1f10a00 100644
--- a/webkit/dom_storage/dom_storage_area_unittest.cc
+++ b/webkit/dom_storage/dom_storage_area_unittest.cc
@@ -68,7 +68,7 @@ class DomStorageAreaTest : public testing::Test {
};
private:
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
};
TEST_F(DomStorageAreaTest, DomStorageAreaBasics) {
@@ -183,7 +183,7 @@ TEST_F(DomStorageAreaTest, BackingDatabaseOpened) {
EXPECT_TRUE(area->commit_batch_.get());
EXPECT_EQ(0, area->commit_batches_in_flight_);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(area->commit_batch_.get());
EXPECT_EQ(0, area->commit_batches_in_flight_);
@@ -232,7 +232,7 @@ TEST_F(DomStorageAreaTest, CommitTasks) {
EXPECT_TRUE(area->commit_batch_.get());
EXPECT_FALSE(area->commit_batch_->clear_all_first);
EXPECT_EQ(2u, area->commit_batch_->changed_values.size());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(area->HasUncommittedChanges());
EXPECT_FALSE(area->commit_batch_.get());
EXPECT_EQ(0, area->commit_batches_in_flight_);
@@ -248,7 +248,7 @@ TEST_F(DomStorageAreaTest, CommitTasks) {
EXPECT_TRUE(area->commit_batch_.get());
EXPECT_TRUE(area->commit_batch_->clear_all_first);
EXPECT_TRUE(area->commit_batch_->changed_values.empty());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(area->commit_batch_.get());
EXPECT_EQ(0, area->commit_batches_in_flight_);
// Verify the changes made it to the database.
@@ -264,11 +264,12 @@ TEST_F(DomStorageAreaTest, CommitTasks) {
// another task in the queue that will execute after the timer task,
// but before the CommitChanges task. From within our injected task,
// we'll make an additional SetItem() call.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&DomStorageAreaTest::InjectedCommitSequencingTask,
- base::Unretained(this), area));
- MessageLoop::current()->RunUntilIdle();
+ base::Unretained(this),
+ area));
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(area->HasOneRef());
EXPECT_FALSE(area->HasUncommittedChanges());
// Verify the changes made it to the database.
@@ -299,7 +300,7 @@ TEST_F(DomStorageAreaTest, CommitChangesAtShutdown) {
area->backing_->ReadAllValues(&values);
EXPECT_TRUE(values.empty()); // not committed yet
area->Shutdown();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(area->HasOneRef());
EXPECT_FALSE(area->backing_.get());
// The VerifyChangesCommittedDatabase destructor verifies values
@@ -327,7 +328,7 @@ TEST_F(DomStorageAreaTest, DeleteOrigin) {
// Commit something in the database and then delete.
NullableString16 old_value;
area->SetItem(kKey, kValue, &old_value);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(file_util::PathExists(db_file_path));
area->DeleteOrigin();
EXPECT_EQ(0u, area->Length());
@@ -342,14 +343,14 @@ TEST_F(DomStorageAreaTest, DeleteOrigin) {
area->DeleteOrigin();
EXPECT_TRUE(area->HasUncommittedChanges());
EXPECT_EQ(0u, area->Length());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(area->HasUncommittedChanges());
EXPECT_FALSE(file_util::PathExists(db_file_path));
// Put some uncommitted changes to a an existing database in
// and then delete.
area->SetItem(kKey, kValue, &old_value);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(file_util::PathExists(db_file_path));
area->SetItem(kKey2, kValue2, &old_value);
EXPECT_TRUE(area->HasUncommittedChanges());
@@ -357,13 +358,13 @@ TEST_F(DomStorageAreaTest, DeleteOrigin) {
area->DeleteOrigin();
EXPECT_TRUE(area->HasUncommittedChanges());
EXPECT_EQ(0u, area->Length());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(area->HasUncommittedChanges());
// Since the area had uncommitted changes at the time delete
// was called, the file will linger until the shutdown time.
EXPECT_TRUE(file_util::PathExists(db_file_path));
area->Shutdown();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(file_util::PathExists(db_file_path));
}
@@ -407,7 +408,7 @@ TEST_F(DomStorageAreaTest, PurgeMemory) {
EXPECT_EQ(original_map, area->map_.get());
// Commit the changes from above,
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(area->HasUncommittedChanges());
new_backing = static_cast<LocalStorageDatabaseAdapter*>(
area->backing_.get())->db_.get();
diff --git a/webkit/dom_storage/dom_storage_context_unittest.cc b/webkit/dom_storage/dom_storage_context_unittest.cc
index ec1d910..00f46b5 100644
--- a/webkit/dom_storage/dom_storage_context_unittest.cc
+++ b/webkit/dom_storage/dom_storage_context_unittest.cc
@@ -48,7 +48,7 @@ class DomStorageContextTest : public testing::Test {
}
virtual void TearDown() {
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
void VerifySingleOriginRemains(const GURL& origin) {
@@ -62,7 +62,7 @@ class DomStorageContextTest : public testing::Test {
}
protected:
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
base::ScopedTempDir temp_dir_;
scoped_refptr<quota::MockSpecialStoragePolicy> storage_policy_;
scoped_refptr<MockDomStorageTaskRunner> task_runner_;
@@ -104,7 +104,7 @@ TEST_F(DomStorageContextTest, UsageInfo) {
OpenStorageArea(kOrigin)->SetItem(kKey, kValue, &old_value));
context_->Shutdown();
context_ = NULL;
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// Create a new context that points to the same directory, see that
// it knows about the origin that we stored data for.
@@ -136,7 +136,7 @@ TEST_F(DomStorageContextTest, SessionOnly) {
OpenStorageArea(kSessionOnlyOrigin)->SetItem(kKey, kValue, &old_value));
context_->Shutdown();
context_ = NULL;
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// Verify that the session-only origin data is gone.
VerifySingleOriginRemains(kOrigin);
@@ -154,7 +154,7 @@ TEST_F(DomStorageContextTest, SetForceKeepSessionState) {
context_->SetForceKeepSessionState(); // Should override clear behavior.
context_->Shutdown();
context_ = NULL;
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
VerifySingleOriginRemains(kSessionOnlyOrigin);
}
@@ -214,11 +214,9 @@ TEST_F(DomStorageContextTest, DeleteSessionStorage) {
// Destroy and recreate the DomStorageContext.
context_->Shutdown();
context_ = NULL;
- MessageLoop::current()->RunUntilIdle();
- context_ = new DomStorageContext(temp_dir_.path(),
- temp_dir_.path(),
- storage_policy_,
- task_runner_);
+ base::MessageLoop::current()->RunUntilIdle();
+ context_ = new DomStorageContext(
+ temp_dir_.path(), temp_dir_.path(), storage_policy_, task_runner_);
context_->SetSaveSessionStorageOnDisk();
// Read the data back.
@@ -239,11 +237,9 @@ TEST_F(DomStorageContextTest, DeleteSessionStorage) {
// Destroy and recreate again.
context_->Shutdown();
context_ = NULL;
- MessageLoop::current()->RunUntilIdle();
- context_ = new DomStorageContext(temp_dir_.path(),
- temp_dir_.path(),
- storage_policy_,
- task_runner_);
+ base::MessageLoop::current()->RunUntilIdle();
+ context_ = new DomStorageContext(
+ temp_dir_.path(), temp_dir_.path(), storage_policy_, task_runner_);
context_->SetSaveSessionStorageOnDisk();
// Now there should be no data.
@@ -256,7 +252,7 @@ TEST_F(DomStorageContextTest, DeleteSessionStorage) {
dom_namespace->CloseStorageArea(area);
context_->Shutdown();
context_ = NULL;
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
} // namespace dom_storage
diff --git a/webkit/fileapi/async_file_test_helper.cc b/webkit/fileapi/async_file_test_helper.cc
index 178efdc..4aaf87a 100644
--- a/webkit/fileapi/async_file_test_helper.cc
+++ b/webkit/fileapi/async_file_test_helper.cc
@@ -228,7 +228,7 @@ quota::QuotaStatusCode AsyncFileTestHelper::GetUsageAndQuota(
origin,
FileSystemTypeToQuotaStorageType(type),
base::Bind(&DidGetUsageAndQuota, &status, usage, quota));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return status;
}
diff --git a/webkit/fileapi/copy_or_move_file_validator_unittest.cc b/webkit/fileapi/copy_or_move_file_validator_unittest.cc
index 505b2aa..a8e8315 100644
--- a/webkit/fileapi/copy_or_move_file_validator_unittest.cc
+++ b/webkit/fileapi/copy_or_move_file_validator_unittest.cc
@@ -39,7 +39,7 @@ class CopyOrMoveFileValidatorTestHelper {
~CopyOrMoveFileValidatorTestHelper() {
file_system_context_ = NULL;
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
void SetUp() {
@@ -158,7 +158,7 @@ class CopyOrMoveFileValidatorTestHelper {
std::string src_fsid_;
std::string dest_fsid_;
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
scoped_refptr<FileSystemContext> file_system_context_;
FileSystemURL copy_src_;
@@ -194,8 +194,8 @@ class TestCopyOrMoveFileValidatorFactory
virtual void StartValidation(
const ResultCallback& result_callback) OVERRIDE {
// Post the result since a real validator must do work asynchronously.
- MessageLoop::current()->PostTask(FROM_HERE, base::Bind(result_callback,
- result_));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE, base::Bind(result_callback, result_));
}
private:
diff --git a/webkit/fileapi/file_system_context_unittest.cc b/webkit/fileapi/file_system_context_unittest.cc
index ed0d999..407bf83 100644
--- a/webkit/fileapi/file_system_context_unittest.cc
+++ b/webkit/fileapi/file_system_context_unittest.cc
@@ -90,7 +90,7 @@ class FileSystemContextTest : public testing::Test {
private:
base::ScopedTempDir data_dir_;
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
scoped_refptr<quota::SpecialStoragePolicy> storage_policy_;
scoped_refptr<quota::MockQuotaManager> mock_quota_manager_;
};
diff --git a/webkit/fileapi/file_system_dir_url_request_job.cc b/webkit/fileapi/file_system_dir_url_request_job.cc
index 0f9cb64..eaafb7a 100644
--- a/webkit/fileapi/file_system_dir_url_request_job.cc
+++ b/webkit/fileapi/file_system_dir_url_request_job.cc
@@ -55,7 +55,7 @@ bool FileSystemDirURLRequestJob::ReadRawData(net::IOBuffer* dest, int dest_size,
}
void FileSystemDirURLRequestJob::Start() {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&FileSystemDirURLRequestJob::StartAsync,
weak_factory_.GetWeakPtr()));
diff --git a/webkit/fileapi/file_system_dir_url_request_job_unittest.cc b/webkit/fileapi/file_system_dir_url_request_job_unittest.cc
index f92f13a..0713282 100644
--- a/webkit/fileapi/file_system_dir_url_request_job_unittest.cc
+++ b/webkit/fileapi/file_system_dir_url_request_job_unittest.cc
@@ -42,7 +42,7 @@ static const char kFileSystemURLPrefix[] =
class FileSystemDirURLRequestJobTest : public testing::Test {
protected:
FileSystemDirURLRequestJobTest()
- : message_loop_(MessageLoop::TYPE_IO), // simulate an IO thread
+ : message_loop_(base::MessageLoop::TYPE_IO), // simulate an IO thread
weak_factory_(this) {
}
@@ -57,7 +57,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
GURL("http://remote/"), kFileSystemTypeTemporary, true, // create
base::Bind(&FileSystemDirURLRequestJobTest::OnValidateFileSystem,
weak_factory_.GetWeakPtr()));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
net::URLRequest::Deprecated::RegisterProtocolFactory(
"filesystem", &FileSystemDirURLRequestJobFactory);
@@ -86,7 +86,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
request_->Start();
ASSERT_TRUE(request_->is_pending()); // verify that we're starting async
if (run_to_completion)
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
void TestRequest(const GURL& url) {
@@ -204,7 +204,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
// Put the message loop at the top, so that it's the last thing deleted.
// Delete all MessageLoopProxy objects before the MessageLoop, to help prevent
// leaks caused by tasks posted during shutdown.
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
base::ScopedTempDir temp_dir_;
net::URLRequestContext empty_context_;
@@ -280,8 +280,8 @@ TEST_F(FileSystemDirURLRequestJobTest, Cancel) {
CreateDirectory("foo");
TestRequestNoRun(CreateFileSystemURL("foo/"));
// Run StartAsync() and only StartAsync().
- MessageLoop::current()->DeleteSoon(FROM_HERE, request_.release());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, request_.release());
+ base::MessageLoop::current()->RunUntilIdle();
// If we get here, success! we didn't crash!
}
diff --git a/webkit/fileapi/file_system_file_stream_reader_unittest.cc b/webkit/fileapi/file_system_file_stream_reader_unittest.cc
index e06c753..7edac14 100644
--- a/webkit/fileapi/file_system_file_stream_reader_unittest.cc
+++ b/webkit/fileapi/file_system_file_stream_reader_unittest.cc
@@ -62,7 +62,7 @@ void NeverCalled(int unused) { ADD_FAILURE(); }
class FileSystemFileStreamReaderTest : public testing::Test {
public:
FileSystemFileStreamReaderTest()
- : message_loop_(MessageLoop::TYPE_IO) {}
+ : message_loop_(base::MessageLoop::TYPE_IO) {}
virtual void SetUp() OVERRIDE {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
@@ -73,14 +73,14 @@ class FileSystemFileStreamReaderTest : public testing::Test {
file_system_context_->sandbox_provider()->ValidateFileSystemRoot(
GURL(kURLOrigin), kFileSystemTypeTemporary, true, // create
base::Bind(&OnValidateFileSystem));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
WriteFile(kTestFileName, kTestData, kTestDataSize,
&test_file_modification_time_);
}
virtual void TearDown() OVERRIDE {
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
protected:
@@ -144,7 +144,7 @@ class FileSystemFileStreamReaderTest : public testing::Test {
base::FilePath().AppendASCII(file_name));
}
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
base::ScopedTempDir temp_dir_;
scoped_refptr<FileSystemContext> file_system_context_;
base::Time test_file_modification_time_;
diff --git a/webkit/fileapi/file_system_mount_point_provider_unittest.cc b/webkit/fileapi/file_system_mount_point_provider_unittest.cc
index 21007e5..516cdb4 100644
--- a/webkit/fileapi/file_system_mount_point_provider_unittest.cc
+++ b/webkit/fileapi/file_system_mount_point_provider_unittest.cc
@@ -172,7 +172,7 @@ class FileSystemMountPointProviderTest : public testing::Test {
private:
base::ScopedTempDir data_dir_;
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
base::WeakPtrFactory<FileSystemMountPointProviderTest> weak_factory_;
scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
diff --git a/webkit/fileapi/file_system_quota_client_unittest.cc b/webkit/fileapi/file_system_quota_client_unittest.cc
index fa4d3a1..cb28310 100644
--- a/webkit/fileapi/file_system_quota_client_unittest.cc
+++ b/webkit/fileapi/file_system_quota_client_unittest.cc
@@ -76,7 +76,7 @@ class FileSystemQuotaClientTest : public testing::Test {
const std::string& origin_url,
quota::StorageType type) {
GetOriginUsageAsync(quota_client, origin_url, type);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return usage_;
}
@@ -87,7 +87,7 @@ class FileSystemQuotaClientTest : public testing::Test {
type,
base::Bind(&FileSystemQuotaClientTest::OnGetOrigins,
weak_factory_.GetWeakPtr()));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return origins_;
}
@@ -99,7 +99,7 @@ class FileSystemQuotaClientTest : public testing::Test {
type, host,
base::Bind(&FileSystemQuotaClientTest::OnGetOrigins,
weak_factory_.GetWeakPtr()));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return origins_;
}
@@ -249,7 +249,7 @@ class FileSystemQuotaClientTest : public testing::Test {
}
base::ScopedTempDir data_dir_;
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
scoped_refptr<FileSystemContext> file_system_context_;
base::WeakPtrFactory<FileSystemQuotaClientTest> weak_factory_;
int64 usage_;
@@ -434,7 +434,7 @@ TEST_F(FileSystemQuotaClientTest, GetUsage_MultipleTasks) {
GetOriginUsageAsync(quota_client.get(), kDummyURL1, kTemporary);
RunAdditionalOriginUsageTask(quota_client.get(), kDummyURL1, kTemporary);
RunAdditionalOriginUsageTask(quota_client.get(), kDummyURL1, kTemporary);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(11 + 22 + file_paths_cost, usage());
EXPECT_EQ(2, additional_callback_count());
@@ -443,7 +443,7 @@ TEST_F(FileSystemQuotaClientTest, GetUsage_MultipleTasks) {
RunAdditionalOriginUsageTask(quota_client.get(), kDummyURL1, kTemporary);
GetOriginUsageAsync(quota_client.get(), kDummyURL1, kTemporary);
RunAdditionalOriginUsageTask(quota_client.get(), kDummyURL1, kTemporary);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(11 + 22 + file_paths_cost, usage());
EXPECT_EQ(2, additional_callback_count());
}
@@ -545,15 +545,15 @@ TEST_F(FileSystemQuotaClientTest, DeleteOriginTest) {
"https://bar.com/", kPersistent);
DeleteOriginData(quota_client.get(), "http://foo.com/", kTemporary);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(quota::kQuotaStatusOk, status());
DeleteOriginData(quota_client.get(), "http://bar.com/", kPersistent);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(quota::kQuotaStatusOk, status());
DeleteOriginData(quota_client.get(), "http://buz.com/", kTemporary);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(quota::kQuotaStatusOk, status());
EXPECT_EQ(0, GetOriginUsage(
diff --git a/webkit/fileapi/file_system_url_request_job.cc b/webkit/fileapi/file_system_url_request_job.cc
index dd12146..cdf7b40 100644
--- a/webkit/fileapi/file_system_url_request_job.cc
+++ b/webkit/fileapi/file_system_url_request_job.cc
@@ -68,7 +68,7 @@ FileSystemURLRequestJob::FileSystemURLRequestJob(
FileSystemURLRequestJob::~FileSystemURLRequestJob() {}
void FileSystemURLRequestJob::Start() {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&FileSystemURLRequestJob::StartAsync,
weak_factory_.GetWeakPtr()));
diff --git a/webkit/fileapi/file_system_url_request_job_unittest.cc b/webkit/fileapi/file_system_url_request_job_unittest.cc
index 414d9bb..21ab3f2 100644
--- a/webkit/fileapi/file_system_url_request_job_unittest.cc
+++ b/webkit/fileapi/file_system_url_request_job_unittest.cc
@@ -50,7 +50,7 @@ void FillBuffer(char* buffer, size_t len) {
class FileSystemURLRequestJobTest : public testing::Test {
protected:
FileSystemURLRequestJobTest()
- : message_loop_(MessageLoop::TYPE_IO), // simulate an IO thread
+ : message_loop_(base::MessageLoop::TYPE_IO), // simulate an IO thread
weak_factory_(this) {
}
@@ -66,7 +66,7 @@ class FileSystemURLRequestJobTest : public testing::Test {
GURL("http://remote/"), kFileSystemTypeTemporary, true, // create
base::Bind(&FileSystemURLRequestJobTest::OnValidateFileSystem,
weak_factory_.GetWeakPtr()));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
net::URLRequest::Deprecated::RegisterProtocolFactory(
"filesystem", &FileSystemURLRequestJobFactory);
@@ -80,7 +80,7 @@ class FileSystemURLRequestJobTest : public testing::Test {
pending_job_ = NULL;
}
// FileReader posts a task to close the file in destructor.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
void OnValidateFileSystem(base::PlatformFileError result) {
@@ -105,7 +105,7 @@ class FileSystemURLRequestJobTest : public testing::Test {
request_->Start();
ASSERT_TRUE(request_->is_pending()); // verify that we're starting async
if (run_to_completion)
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
void TestRequest(const GURL& url) {
@@ -188,7 +188,7 @@ class FileSystemURLRequestJobTest : public testing::Test {
}
// Put the message loop at the top, so that it's the last thing deleted.
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
base::ScopedTempDir temp_dir_;
scoped_refptr<FileSystemContext> file_system_context_;
@@ -303,7 +303,7 @@ TEST_F(FileSystemURLRequestJobTest, FileDirRedirect) {
// We've deferred the redirect; now cancel the request to avoid following it.
request_->Cancel();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TEST_F(FileSystemURLRequestJobTest, InvalidURL) {
@@ -332,8 +332,8 @@ TEST_F(FileSystemURLRequestJobTest, Cancel) {
TestRequestNoRun(CreateFileSystemURL("file1.dat"));
// Run StartAsync() and only StartAsync().
- MessageLoop::current()->DeleteSoon(FROM_HERE, request_.release());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, request_.release());
+ base::MessageLoop::current()->RunUntilIdle();
// If we get here, success! we didn't crash!
}
diff --git a/webkit/fileapi/file_system_usage_cache_unittest.cc b/webkit/fileapi/file_system_usage_cache_unittest.cc
index 2435e59..324bc3c 100644
--- a/webkit/fileapi/file_system_usage_cache_unittest.cc
+++ b/webkit/fileapi/file_system_usage_cache_unittest.cc
@@ -31,7 +31,7 @@ class FileSystemUsageCacheTest : public testing::Test {
}
private:
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
base::ScopedTempDir data_dir_;
FileSystemUsageCache usage_cache_;
diff --git a/webkit/fileapi/file_writer_delegate.cc b/webkit/fileapi/file_writer_delegate.cc
index 4a579a1..4eb902c 100644
--- a/webkit/fileapi/file_writer_delegate.cc
+++ b/webkit/fileapi/file_writer_delegate.cc
@@ -125,10 +125,11 @@ void FileWriterDelegate::Read() {
bytes_written_ = 0;
bytes_read_ = 0;
if (request_->Read(io_buffer_.get(), io_buffer_->size(), &bytes_read_)) {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&FileWriterDelegate::OnDataReceived,
- weak_factory_.GetWeakPtr(), bytes_read_));
+ weak_factory_.GetWeakPtr(),
+ bytes_read_));
} else if (!request_->status().is_io_pending()) {
OnError(base::PLATFORM_FILE_ERROR_FAILED);
}
@@ -156,10 +157,11 @@ void FileWriterDelegate::Write() {
base::Bind(&FileWriterDelegate::OnDataWritten,
weak_factory_.GetWeakPtr()));
if (write_response > 0)
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&FileWriterDelegate::OnDataWritten,
- weak_factory_.GetWeakPtr(), write_response));
+ weak_factory_.GetWeakPtr(),
+ write_response));
else if (net::ERR_IO_PENDING != write_response)
OnError(NetErrorToPlatformFileError(write_response));
}
diff --git a/webkit/fileapi/file_writer_delegate_unittest.cc b/webkit/fileapi/file_writer_delegate_unittest.cc
index 887ec56..df5c9dc 100644
--- a/webkit/fileapi/file_writer_delegate_unittest.cc
+++ b/webkit/fileapi/file_writer_delegate_unittest.cc
@@ -48,11 +48,11 @@ class Result {
if (status == base::PLATFORM_FILE_OK) {
bytes_written_ += bytes;
if (write_status_ != FileWriterDelegate::SUCCESS_IO_PENDING)
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
} else {
EXPECT_EQ(base::PLATFORM_FILE_OK, status_);
status_ = status;
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
}
@@ -71,7 +71,7 @@ const int kDataSize = ARRAYSIZE_UNSAFE(kData) - 1;
class FileWriterDelegateTest : public PlatformTest {
public:
FileWriterDelegateTest()
- : loop_(MessageLoop::TYPE_IO),
+ : loop_(base::MessageLoop::TYPE_IO),
test_helper_(GURL("http://example.com"), kFileSystemTypeTest) {}
protected:
@@ -122,7 +122,7 @@ class FileWriterDelegateTest : public PlatformTest {
static net::URLRequest::ProtocolFactory Factory;
// This should be alive until the very end of this instance.
- MessageLoop loop_;
+ base::MessageLoop loop_;
net::URLRequestContext empty_context_;
scoped_ptr<FileWriterDelegate> file_writer_delegate_;
@@ -153,7 +153,7 @@ class FileWriterDelegateTestJob : public net::URLRequestJob {
}
virtual void Start() OVERRIDE {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&FileWriterDelegateTestJob::NotifyHeadersComplete, this));
}
@@ -237,7 +237,7 @@ TEST_F(FileWriterDelegateTest, MAYBE_WriteSuccessWithoutQuotaLimit) {
ASSERT_EQ(0, test_helper_.GetCachedOriginUsage());
file_writer_delegate_->Start(request_.Pass());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
ASSERT_EQ(FileWriterDelegate::SUCCESS_COMPLETED, result_->write_status());
file_writer_delegate_.reset();
@@ -264,7 +264,7 @@ TEST_F(FileWriterDelegateTest, MAYBE_WriteSuccessWithJustQuota) {
ASSERT_EQ(0, test_helper_.GetCachedOriginUsage());
file_writer_delegate_->Start(request_.Pass());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
ASSERT_EQ(FileWriterDelegate::SUCCESS_COMPLETED, result_->write_status());
file_writer_delegate_.reset();
@@ -283,7 +283,7 @@ TEST_F(FileWriterDelegateTest, DISABLED_WriteFailureByQuota) {
ASSERT_EQ(0, test_helper_.GetCachedOriginUsage());
file_writer_delegate_->Start(request_.Pass());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
ASSERT_EQ(FileWriterDelegate::ERROR_WRITE_STARTED, result_->write_status());
file_writer_delegate_.reset();
@@ -303,7 +303,7 @@ TEST_F(FileWriterDelegateTest, WriteZeroBytesSuccessfullyWithZeroQuota) {
ASSERT_EQ(0, test_helper_.GetCachedOriginUsage());
file_writer_delegate_->Start(request_.Pass());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
ASSERT_EQ(FileWriterDelegate::SUCCESS_COMPLETED, result_->write_status());
file_writer_delegate_.reset();
@@ -353,10 +353,10 @@ TEST_F(FileWriterDelegateTest, MAYBE_WriteSuccessWithoutQuotaLimitConcurrent) {
ASSERT_EQ(0, test_helper_.GetCachedOriginUsage());
file_writer_delegate_->Start(request_.Pass());
file_writer_delegate2->Start(request2.Pass());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
if (result_->write_status() == FileWriterDelegate::SUCCESS_IO_PENDING ||
result2->write_status() == FileWriterDelegate::SUCCESS_IO_PENDING)
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
ASSERT_EQ(FileWriterDelegate::SUCCESS_COMPLETED, result_->write_status());
ASSERT_EQ(FileWriterDelegate::SUCCESS_COMPLETED, result2->write_status());
@@ -393,7 +393,7 @@ TEST_F(FileWriterDelegateTest, MAYBE_WritesWithQuotaAndOffset) {
ASSERT_EQ(0, test_helper_.GetCachedOriginUsage());
file_writer_delegate_->Start(request_.Pass());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
ASSERT_EQ(FileWriterDelegate::SUCCESS_COMPLETED, result_->write_status());
file_writer_delegate_.reset();
@@ -408,7 +408,7 @@ TEST_F(FileWriterDelegateTest, MAYBE_WritesWithQuotaAndOffset) {
PrepareForWrite(kBlobURL, offset, allowed_growth);
file_writer_delegate_->Start(request_.Pass());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(kDataSize, test_helper_.GetCachedOriginUsage());
EXPECT_EQ(ComputeCurrentOriginUsage(), test_helper_.GetCachedOriginUsage());
EXPECT_EQ(kDataSize, result_->bytes_written());
@@ -422,7 +422,7 @@ TEST_F(FileWriterDelegateTest, MAYBE_WritesWithQuotaAndOffset) {
PrepareForWrite(kBlobURL, offset, allowed_growth);
file_writer_delegate_->Start(request_.Pass());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
ASSERT_EQ(FileWriterDelegate::SUCCESS_COMPLETED, result_->write_status());
file_writer_delegate_.reset();
@@ -438,7 +438,7 @@ TEST_F(FileWriterDelegateTest, MAYBE_WritesWithQuotaAndOffset) {
int64 pre_write_usage = ComputeCurrentOriginUsage();
file_writer_delegate_->Start(request_.Pass());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
ASSERT_EQ(FileWriterDelegate::SUCCESS_COMPLETED, result_->write_status());
file_writer_delegate_.reset();
@@ -455,7 +455,7 @@ TEST_F(FileWriterDelegateTest, MAYBE_WritesWithQuotaAndOffset) {
PrepareForWrite(kBlobURL, offset, allowed_growth);
file_writer_delegate_->Start(request_.Pass());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
ASSERT_EQ(FileWriterDelegate::ERROR_WRITE_STARTED, result_->write_status());
file_writer_delegate_.reset();
diff --git a/webkit/fileapi/isolated_file_util_unittest.cc b/webkit/fileapi/isolated_file_util_unittest.cc
index 67caff6..7452a31 100644
--- a/webkit/fileapi/isolated_file_util_unittest.cc
+++ b/webkit/fileapi/isolated_file_util_unittest.cc
@@ -275,7 +275,7 @@ class IsolatedFileUtilTest : public testing::Test {
base::ScopedTempDir data_dir_;
base::ScopedTempDir partition_dir_;
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
std::string filesystem_id_;
scoped_refptr<FileSystemContext> file_system_context_;
std::map<base::FilePath, base::FilePath> toplevel_root_map_;
diff --git a/webkit/fileapi/local_file_stream_writer_unittest.cc b/webkit/fileapi/local_file_stream_writer_unittest.cc
index 41c547e..da8fa51 100644
--- a/webkit/fileapi/local_file_stream_writer_unittest.cc
+++ b/webkit/fileapi/local_file_stream_writer_unittest.cc
@@ -22,7 +22,7 @@ using fileapi::LocalFileStreamWriter;
class LocalFileStreamWriterTest : public testing::Test {
public:
- LocalFileStreamWriterTest() : message_loop_(MessageLoop::TYPE_IO) {}
+ LocalFileStreamWriterTest() : message_loop_(base::MessageLoop::TYPE_IO) {}
virtual void SetUp() OVERRIDE {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
@@ -66,7 +66,7 @@ class LocalFileStreamWriterTest : public testing::Test {
}
private:
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
base::ScopedTempDir temp_dir_;
};
@@ -82,7 +82,7 @@ TEST_F(LocalFileStreamWriterTest, Write) {
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "foo"));
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "bar"));
writer.reset();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(file_util::PathExists(path));
EXPECT_EQ("foobar", GetFileContent(path));
}
@@ -92,7 +92,7 @@ TEST_F(LocalFileStreamWriterTest, WriteMiddle) {
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 2));
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "xxx"));
writer.reset();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(file_util::PathExists(path));
EXPECT_EQ("foxxxr", GetFileContent(path));
}
@@ -102,7 +102,7 @@ TEST_F(LocalFileStreamWriterTest, WriteEnd) {
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 6));
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "xxx"));
writer.reset();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(file_util::PathExists(path));
EXPECT_EQ("foobarxxx", GetFileContent(path));
}
@@ -113,7 +113,7 @@ TEST_F(LocalFileStreamWriterTest, WriteFailForNonexistingFile) {
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 0));
EXPECT_EQ(net::ERR_FILE_NOT_FOUND, WriteStringToWriter(writer.get(), "foo"));
writer.reset();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(file_util::PathExists(path));
}
@@ -135,7 +135,7 @@ TEST_F(LocalFileStreamWriterTest, CancelAfterFinishedOperation) {
EXPECT_EQ(net::ERR_UNEXPECTED, cancel_result);
writer.reset();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// Write operation is already completed.
EXPECT_TRUE(file_util::PathExists(path));
EXPECT_EQ("foo", GetFileContent(path));
diff --git a/webkit/fileapi/local_file_system_cross_operation_unittest.cc b/webkit/fileapi/local_file_system_cross_operation_unittest.cc
index c813875..a4f6887 100644
--- a/webkit/fileapi/local_file_system_cross_operation_unittest.cc
+++ b/webkit/fileapi/local_file_system_cross_operation_unittest.cc
@@ -42,7 +42,7 @@ class CrossOperationTestHelper {
quota_manager_proxy_->SimulateQuotaManagerDestroyed();
quota_manager_ = NULL;
quota_manager_proxy_ = NULL;
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
void SetUp() {
@@ -215,7 +215,7 @@ class CrossOperationTestHelper {
const FileSystemType src_type_;
const FileSystemType dest_type_;
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
scoped_refptr<FileSystemContext> file_system_context_;
scoped_refptr<quota::MockQuotaManagerProxy> quota_manager_proxy_;
scoped_refptr<quota::MockQuotaManager> quota_manager_;
diff --git a/webkit/fileapi/local_file_system_operation_unittest.cc b/webkit/fileapi/local_file_system_operation_unittest.cc
index 2d228bb..82ea8ac 100644
--- a/webkit/fileapi/local_file_system_operation_unittest.cc
+++ b/webkit/fileapi/local_file_system_operation_unittest.cc
@@ -234,7 +234,7 @@ class LocalFileSystemOperationTest
AsyncFileTestHelper::GetUsageAndQuota(
quota_manager_, test_helper_.origin(), test_helper_.type(),
usage, quota);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(quota::kQuotaStatusOk, status);
}
@@ -248,7 +248,7 @@ class LocalFileSystemOperationTest
false /* recursive */,
base::Bind(&AssertFileErrorEq,
base::PLATFORM_FILE_OK));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
int64 total_usage;
GetUsageAndQuota(&total_usage, NULL);
@@ -279,7 +279,7 @@ class LocalFileSystemOperationTest
scoped_refptr<ShareableFileReference> shareable_file_ref_;
private:
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
scoped_refptr<QuotaManager> quota_manager_;
scoped_refptr<QuotaManagerProxy> quota_manager_proxy_;
@@ -296,7 +296,7 @@ TEST_F(LocalFileSystemOperationTest, TestMoveFailureSrcDoesntExist) {
FileSystemURL dest(URLForPath(base::FilePath(FILE_PATH_LITERAL("b"))));
change_observer()->ResetCount();
NewOperation()->Move(src, dest, RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -307,7 +307,7 @@ TEST_F(LocalFileSystemOperationTest, TestMoveFailureContainsPath) {
NewOperation()->Move(
URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_INVALID_OPERATION, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -321,7 +321,7 @@ TEST_F(LocalFileSystemOperationTest, TestMoveFailureSrcDirExistsDestFile) {
NewOperation()->Move(
URLForPath(src_dir_path), URLForPath(dest_file_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_INVALID_OPERATION, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -336,7 +336,7 @@ TEST_F(LocalFileSystemOperationTest,
NewOperation()->Move(
URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_EMPTY, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -350,7 +350,7 @@ TEST_F(LocalFileSystemOperationTest, TestMoveFailureSrcFileExistsDestDir) {
NewOperation()->Move(
URLForPath(src_file_path), URLForPath(dest_dir_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_INVALID_OPERATION, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -365,7 +365,7 @@ TEST_F(LocalFileSystemOperationTest, TestMoveFailureDestParentDoesntExist) {
NewOperation()->Move(
URLForPath(src_dir_path), URLForPath(nonexisting_file),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -379,7 +379,7 @@ TEST_F(LocalFileSystemOperationTest, TestMoveSuccessSrcFileAndOverwrite) {
NewOperation()->Move(
URLForPath(src_file_path), URLForPath(dest_file_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(FileExists(dest_file_path));
@@ -400,7 +400,7 @@ TEST_F(LocalFileSystemOperationTest, TestMoveSuccessSrcFileAndNew) {
NewOperation()->Move(
URLForPath(src_file_path), URLForPath(dest_file_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(FileExists(dest_file_path));
@@ -416,7 +416,7 @@ TEST_F(LocalFileSystemOperationTest, TestMoveSuccessSrcDirAndOverwrite) {
NewOperation()->Move(
URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_FALSE(DirectoryExists(src_dir_path));
@@ -439,7 +439,7 @@ TEST_F(LocalFileSystemOperationTest, TestMoveSuccessSrcDirAndNew) {
NewOperation()->Move(
URLForPath(src_dir_path), URLForPath(dest_child_dir_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_FALSE(DirectoryExists(src_dir_path));
EXPECT_TRUE(DirectoryExists(dest_child_dir_path));
@@ -460,7 +460,7 @@ TEST_F(LocalFileSystemOperationTest, TestMoveSuccessSrcDirRecursive) {
NewOperation()->Move(
URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(DirectoryExists(dest_dir_path.Append(
VirtualPath::BaseName(child_dir_path))));
@@ -480,7 +480,7 @@ TEST_F(LocalFileSystemOperationTest, TestCopyFailureSrcDoesntExist) {
URLForPath(base::FilePath(FILE_PATH_LITERAL("a"))),
URLForPath(base::FilePath(FILE_PATH_LITERAL("b"))),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -491,7 +491,7 @@ TEST_F(LocalFileSystemOperationTest, TestCopyFailureContainsPath) {
NewOperation()->Copy(
URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_INVALID_OPERATION, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -505,7 +505,7 @@ TEST_F(LocalFileSystemOperationTest, TestCopyFailureSrcDirExistsDestFile) {
NewOperation()->Copy(
URLForPath(src_dir_path), URLForPath(dest_file_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_INVALID_OPERATION, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -520,7 +520,7 @@ TEST_F(LocalFileSystemOperationTest,
NewOperation()->Copy(
URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_EMPTY, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -534,7 +534,7 @@ TEST_F(LocalFileSystemOperationTest, TestCopyFailureSrcFileExistsDestDir) {
NewOperation()->Copy(
URLForPath(src_file_path), URLForPath(dest_dir_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_INVALID_OPERATION, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -551,7 +551,7 @@ TEST_F(LocalFileSystemOperationTest, TestCopyFailureDestParentDoesntExist) {
URLForPath(src_dir_path),
URLForPath(nonexisting_file_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -572,7 +572,7 @@ TEST_F(LocalFileSystemOperationTest, TestCopyFailureByQuota) {
NewOperation()->Truncate(URLForPath(src_file_path), 6,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
AddQuota(6 + dest_path_cost - 1);
@@ -583,7 +583,7 @@ TEST_F(LocalFileSystemOperationTest, TestCopyFailureByQuota) {
NewOperation()->Copy(
URLForPath(src_file_path), URLForPath(dest_file_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NO_SPACE, status());
EXPECT_FALSE(FileExists(dest_file_path));
}
@@ -597,7 +597,7 @@ TEST_F(LocalFileSystemOperationTest, TestCopySuccessSrcFileAndOverwrite) {
NewOperation()->Copy(
URLForPath(src_file_path), URLForPath(dest_file_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(FileExists(dest_file_path));
EXPECT_EQ(2, quota_manager_proxy()->notify_storage_accessed_count());
@@ -616,7 +616,7 @@ TEST_F(LocalFileSystemOperationTest, TestCopySuccessSrcFileAndNew) {
NewOperation()->Copy(
URLForPath(src_file_path), URLForPath(dest_file_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(FileExists(dest_file_path));
EXPECT_EQ(2, quota_manager_proxy()->notify_storage_accessed_count());
@@ -632,7 +632,7 @@ TEST_F(LocalFileSystemOperationTest, TestCopySuccessSrcDirAndOverwrite) {
NewOperation()->Copy(
URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
// Make sure we've overwritten but not copied the source under the |dest_dir|.
@@ -655,7 +655,7 @@ TEST_F(LocalFileSystemOperationTest, TestCopySuccessSrcDirAndNew) {
NewOperation()->Copy(
URLForPath(src_dir_path), URLForPath(dest_child_dir_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(DirectoryExists(dest_child_dir_path));
EXPECT_EQ(2, quota_manager_proxy()->notify_storage_accessed_count());
@@ -674,7 +674,7 @@ TEST_F(LocalFileSystemOperationTest, TestCopySuccessSrcDirRecursive) {
NewOperation()->Copy(
URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(DirectoryExists(dest_dir_path.Append(
VirtualPath::BaseName(child_dir_path))));
@@ -708,7 +708,7 @@ TEST_F(LocalFileSystemOperationTest, TestCopyInForeignFileSuccess) {
NewOperation()->CopyInForeignFile(src_local_disk_file_path,
dest_file_url,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, change_observer()->create_file_count());
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(FileExists(dest_file_path));
@@ -743,7 +743,7 @@ TEST_F(LocalFileSystemOperationTest, TestCopyInForeignFileFailureByQuota) {
NewOperation()->CopyInForeignFile(src_local_disk_file_path,
dest_file_url,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(!FileExists(dest_file_path));
EXPECT_EQ(0, change_observer()->create_file_count());
@@ -756,7 +756,7 @@ TEST_F(LocalFileSystemOperationTest, TestCreateFileFailure) {
base::FilePath file_path(CreateUniqueFileInDir(dir_path));
NewOperation()->CreateFile(URLForPath(file_path), true,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_EXISTS, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -767,7 +767,7 @@ TEST_F(LocalFileSystemOperationTest, TestCreateFileSuccessFileExists) {
base::FilePath file_path(CreateUniqueFileInDir(dir_path));
NewOperation()->CreateFile(URLForPath(file_path), false,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(FileExists(file_path));
@@ -782,7 +782,7 @@ TEST_F(LocalFileSystemOperationTest, TestCreateFileSuccessExclusive) {
dir_path.Append(FILE_PATH_LITERAL("FileDoesntExist")));
NewOperation()->CreateFile(URLForPath(file_path), true,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(FileExists(file_path));
EXPECT_EQ(1, change_observer()->get_and_reset_create_file_count());
@@ -795,7 +795,7 @@ TEST_F(LocalFileSystemOperationTest, TestCreateFileSuccessFileDoesntExist) {
dir_path.Append(FILE_PATH_LITERAL("FileDoesntExist")));
NewOperation()->CreateFile(URLForPath(file_path), false,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_EQ(1, change_observer()->get_and_reset_create_file_count());
}
@@ -810,7 +810,7 @@ TEST_F(LocalFileSystemOperationTest,
NewOperation()->CreateDirectory(
URLForPath(nonexisting_file_path), false, false,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -820,7 +820,7 @@ TEST_F(LocalFileSystemOperationTest, TestCreateDirFailureDirExists) {
base::FilePath src_dir_path(CreateUniqueDir());
NewOperation()->CreateDirectory(URLForPath(src_dir_path), true, false,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_EXISTS, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -831,7 +831,7 @@ TEST_F(LocalFileSystemOperationTest, TestCreateDirFailureFileExists) {
base::FilePath file_path(CreateUniqueFileInDir(dir_path));
NewOperation()->CreateDirectory(URLForPath(file_path), true, false,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_EXISTS, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -841,7 +841,7 @@ TEST_F(LocalFileSystemOperationTest, TestCreateDirSuccess) {
base::FilePath dir_path(CreateUniqueDir());
NewOperation()->CreateDirectory(URLForPath(dir_path), false, false,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(change_observer()->HasNoChange());
@@ -851,7 +851,7 @@ TEST_F(LocalFileSystemOperationTest, TestCreateDirSuccess) {
NewOperation()->CreateDirectory(
URLForPath(nonexisting_dir_path), false, false,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(DirectoryExists(nonexisting_dir_path));
EXPECT_EQ(1, change_observer()->get_and_reset_create_directory_count());
@@ -865,7 +865,7 @@ TEST_F(LocalFileSystemOperationTest, TestCreateDirSuccessExclusive) {
NewOperation()->CreateDirectory(
URLForPath(nonexisting_dir_path), true, false,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(DirectoryExists(nonexisting_dir_path));
EXPECT_EQ(1, change_observer()->get_and_reset_create_directory_count());
@@ -878,18 +878,18 @@ TEST_F(LocalFileSystemOperationTest, TestExistsAndMetadataFailure) {
NewOperation()->GetMetadata(
URLForPath(nonexisting_dir_path),
RecordMetadataCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, status());
NewOperation()->FileExists(URLForPath(nonexisting_dir_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, status());
nonexisting_dir_path = nonexisting_dir_path.AsEndingWithSeparator();
NewOperation()->DirectoryExists(URLForPath(nonexisting_dir_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -900,12 +900,12 @@ TEST_F(LocalFileSystemOperationTest, TestExistsAndMetadataSuccess) {
NewOperation()->DirectoryExists(URLForPath(dir_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
++read_access;
NewOperation()->GetMetadata(URLForPath(dir_path), RecordMetadataCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(info().is_directory);
EXPECT_EQ(base::FilePath(), path());
@@ -913,12 +913,12 @@ TEST_F(LocalFileSystemOperationTest, TestExistsAndMetadataSuccess) {
base::FilePath file_path(CreateUniqueFileInDir(dir_path));
NewOperation()->FileExists(URLForPath(file_path), RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
++read_access;
NewOperation()->GetMetadata(URLForPath(file_path), RecordMetadataCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_FALSE(info().is_directory);
EXPECT_EQ(PlatformPath(file_path), path());
@@ -932,14 +932,14 @@ TEST_F(LocalFileSystemOperationTest, TestExistsAndMetadataSuccess) {
TEST_F(LocalFileSystemOperationTest, TestTypeMismatchErrors) {
base::FilePath dir_path(CreateUniqueDir());
NewOperation()->FileExists(URLForPath(dir_path), RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_A_FILE, status());
base::FilePath file_path(CreateUniqueFileInDir(dir_path));
ASSERT_FALSE(file_path.empty());
NewOperation()->DirectoryExists(URLForPath(file_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY, status());
}
@@ -949,7 +949,7 @@ TEST_F(LocalFileSystemOperationTest, TestReadDirFailure) {
FILE_PATH_LITERAL("NonExistingDir")).AsEndingWithSeparator());
NewOperation()->ReadDirectory(URLForPath(nonexisting_dir_path),
RecordReadDirectoryCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, status());
// File exists.
@@ -957,7 +957,7 @@ TEST_F(LocalFileSystemOperationTest, TestReadDirFailure) {
base::FilePath file_path(CreateUniqueFileInDir(dir_path));
NewOperation()->ReadDirectory(URLForPath(file_path),
RecordReadDirectoryCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -974,7 +974,7 @@ TEST_F(LocalFileSystemOperationTest, TestReadDirSuccess) {
NewOperation()->ReadDirectory(URLForPath(parent_dir_path),
RecordReadDirectoryCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_EQ(2u, entries().size());
@@ -998,7 +998,7 @@ TEST_F(LocalFileSystemOperationTest, TestRemoveFailure) {
NewOperation()->Remove(URLForPath(nonexisting_path), false /* recursive */,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, status());
// It's an error to try to remove a non-empty directory if recursive flag
@@ -1014,9 +1014,8 @@ TEST_F(LocalFileSystemOperationTest, TestRemoveFailure) {
NewOperation()->Remove(URLForPath(parent_dir_path), false /* recursive */,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
- EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_EMPTY,
- status());
+ base::MessageLoop::current()->RunUntilIdle();
+ EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_EMPTY, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
@@ -1026,7 +1025,7 @@ TEST_F(LocalFileSystemOperationTest, TestRemoveSuccess) {
NewOperation()->Remove(URLForPath(empty_dir_path), false /* recursive */,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_FALSE(DirectoryExists(empty_dir_path));
@@ -1053,7 +1052,7 @@ TEST_F(LocalFileSystemOperationTest, TestRemoveSuccessRecursive) {
NewOperation()->Remove(URLForPath(parent_dir_path), true /* recursive */,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_FALSE(DirectoryExists(parent_dir_path));
@@ -1074,7 +1073,7 @@ TEST_F(LocalFileSystemOperationTest, TestTruncate) {
// Check that its length is the size of the data written.
NewOperation()->GetMetadata(URLForPath(file_path), RecordMetadataCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_FALSE(info().is_directory);
EXPECT_EQ(data_size, info().size);
@@ -1083,7 +1082,7 @@ TEST_F(LocalFileSystemOperationTest, TestTruncate) {
int length = 17;
NewOperation()->Truncate(
URLForPath(file_path), length, RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_EQ(1, change_observer()->get_and_reset_modify_file_count());
@@ -1108,7 +1107,7 @@ TEST_F(LocalFileSystemOperationTest, TestTruncate) {
length = 3;
NewOperation()->Truncate(
URLForPath(file_path), length, RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_EQ(1, change_observer()->get_and_reset_modify_file_count());
@@ -1136,7 +1135,7 @@ TEST_F(LocalFileSystemOperationTest, TestTruncateFailureByQuota) {
AddQuota(10);
NewOperation()->Truncate(URLForPath(file_path), 10, RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_EQ(1, change_observer()->get_and_reset_modify_file_count());
EXPECT_TRUE(change_observer()->HasNoChange());
@@ -1145,7 +1144,7 @@ TEST_F(LocalFileSystemOperationTest, TestTruncateFailureByQuota) {
EXPECT_EQ(10, info.size);
NewOperation()->Truncate(URLForPath(file_path), 11, RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NO_SPACE, status());
EXPECT_TRUE(change_observer()->HasNoChange());
@@ -1174,7 +1173,7 @@ TEST_F(LocalFileSystemOperationTest, TestTouchFile) {
NewOperation()->TouchFile(
URLForPath(file_path), new_accessed_time, new_modified_time,
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(change_observer()->HasNoChange());
@@ -1194,7 +1193,7 @@ TEST_F(LocalFileSystemOperationTest, TestCreateSnapshotFile) {
RecordStatusCallback());
base::FilePath file_path(CreateUniqueFileInDir(dir_path));
NewOperation()->FileExists(URLForPath(file_path), RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
// See if we can get a 'snapshot' file info for the file.
@@ -1203,7 +1202,7 @@ TEST_F(LocalFileSystemOperationTest, TestCreateSnapshotFile) {
// as the file itself.
NewOperation()->CreateSnapshotFile(URLForPath(file_path),
RecordSnapshotFileCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_FALSE(info().is_directory);
EXPECT_EQ(PlatformPath(file_path), path());
diff --git a/webkit/fileapi/local_file_system_operation_write_unittest.cc b/webkit/fileapi/local_file_system_operation_write_unittest.cc
index 6f0a228..a377051 100644
--- a/webkit/fileapi/local_file_system_operation_write_unittest.cc
+++ b/webkit/fileapi/local_file_system_operation_write_unittest.cc
@@ -76,7 +76,7 @@ class LocalFileSystemOperationWriteTest
public:
LocalFileSystemOperationWriteTest()
: test_helper_(GURL("http://example.com"), kFileSystemTypeTest),
- loop_(MessageLoop::TYPE_IO),
+ loop_(base::MessageLoop::TYPE_IO),
status_(base::PLATFORM_FILE_OK),
cancel_status_(base::PLATFORM_FILE_ERROR_FAILED),
bytes_written_(0),
@@ -147,14 +147,14 @@ class LocalFileSystemOperationWriteTest
if (status == base::PLATFORM_FILE_OK) {
add_bytes_written(bytes, complete);
if (complete)
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
} else {
EXPECT_FALSE(complete_);
EXPECT_EQ(status_, base::PLATFORM_FILE_OK);
complete_ = true;
status_ = status;
- if (MessageLoop::current()->is_running())
- MessageLoop::current()->Quit();
+ if (base::MessageLoop::current()->is_running())
+ base::MessageLoop::current()->Quit();
}
}
@@ -169,7 +169,7 @@ class LocalFileSystemOperationWriteTest
scoped_refptr<MockQuotaManager> quota_manager_;
LocalFileSystemTestOriginHelper test_helper_;
- MessageLoop loop_;
+ base::MessageLoop loop_;
base::ScopedTempDir dir_;
base::FilePath virtual_path_;
@@ -196,7 +196,7 @@ TEST_F(LocalFileSystemOperationWriteTest, TestWriteSuccess) {
NewOperation()->Write(
&url_request_context_, URLForPath(virtual_path_), blob_url,
0, RecordWriteCallback());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(14, bytes_written());
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
@@ -215,7 +215,7 @@ TEST_F(LocalFileSystemOperationWriteTest, TestWriteZero) {
NewOperation()->Write(
&url_request_context_, URLForPath(virtual_path_),
blob_url, 0, RecordWriteCallback());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
url_request_context_.blob_storage_controller()->RemoveBlob(blob_url);
@@ -230,7 +230,7 @@ TEST_F(LocalFileSystemOperationWriteTest, TestWriteInvalidBlobUrl) {
NewOperation()->Write(
&url_request_context_, URLForPath(virtual_path_),
GURL("blob:invalid"), 0, RecordWriteCallback());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(0, bytes_written());
EXPECT_EQ(base::PLATFORM_FILE_ERROR_FAILED, status());
@@ -247,7 +247,7 @@ TEST_F(LocalFileSystemOperationWriteTest, TestWriteInvalidFile) {
&url_request_context_,
URLForPath(base::FilePath(FILE_PATH_LITERAL("nonexist"))),
blob_url, 0, RecordWriteCallback());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(0, bytes_written());
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, status());
@@ -269,7 +269,7 @@ TEST_F(LocalFileSystemOperationWriteTest, TestWriteDir) {
NewOperation()->Write(&url_request_context_, URLForPath(virtual_dir_path),
blob_url, 0, RecordWriteCallback());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(0, bytes_written());
// TODO(kinuko): This error code is platform- or fileutil- dependent
@@ -290,7 +290,7 @@ TEST_F(LocalFileSystemOperationWriteTest, TestWriteFailureByQuota) {
NewOperation()->Write(
&url_request_context_, URLForPath(virtual_path_), blob_url,
0, RecordWriteCallback());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(10, bytes_written());
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NO_SPACE, status());
@@ -310,7 +310,7 @@ TEST_F(LocalFileSystemOperationWriteTest, TestImmediateCancelSuccessfulWrite) {
// We use RunAllPendings() instead of Run() here, because we won't dispatch
// callbacks after Cancel() is issued (so no chance to Quit) nor do we need
// to run another write cycle.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// Issued Cancel() before receiving any response from Write(),
// so nothing should have happen.
@@ -335,7 +335,7 @@ TEST_F(LocalFileSystemOperationWriteTest, TestImmediateCancelFailingWrite) {
// We use RunAllPendings() instead of Run() here, because we won't dispatch
// callbacks after Cancel() is issued (so no chance to Quit) nor do we need
// to run another write cycle.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// Issued Cancel() before receiving any response from Write(),
// so nothing should have happen.
diff --git a/webkit/fileapi/local_file_system_quota_unittest.cc b/webkit/fileapi/local_file_system_quota_unittest.cc
index 7eaa421..3b759af 100644
--- a/webkit/fileapi/local_file_system_quota_unittest.cc
+++ b/webkit/fileapi/local_file_system_quota_unittest.cc
@@ -107,7 +107,7 @@ class LocalFileSystemQuotaTest
}
int64 SizeByQuotaUtil() {
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return test_helper_.GetCachedOriginUsage();
}
@@ -115,7 +115,7 @@ class LocalFileSystemQuotaTest
quota_status_ = AsyncFileTestHelper::GetUsageAndQuota(
quota_manager_, test_helper_.origin(), test_helper_.type(),
&usage_, &quota_);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
bool FileExists(const base::FilePath& virtual_path) {
@@ -183,7 +183,7 @@ class LocalFileSystemQuotaTest
LocalFileSystemTestOriginHelper test_helper_;
base::ScopedTempDir work_dir_;
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
scoped_refptr<quota::QuotaManager> quota_manager_;
base::WeakPtrFactory<LocalFileSystemQuotaTest> weak_factory_;
@@ -234,7 +234,7 @@ TEST_F(LocalFileSystemQuotaTest, TestMoveSuccessSrcDirRecursive) {
NewOperation()->Truncate(
URLForPath(grandchild_file2_path_), 2,
base::Bind(&AssertFileErrorEq, base::PLATFORM_FILE_OK));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 all_file_size = 5000 + 400 + 30 + 2;
@@ -248,7 +248,7 @@ TEST_F(LocalFileSystemQuotaTest, TestMoveSuccessSrcDirRecursive) {
NewOperation()->Move(
URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(DirectoryExists(dest_dir_path.Append(
@@ -287,7 +287,7 @@ TEST_F(LocalFileSystemQuotaTest, TestCopySuccessSrcDirRecursive) {
NewOperation()->Truncate(
URLForPath(grandchild_file2_path_), 5,
base::Bind(&AssertFileErrorEq, base::PLATFORM_FILE_OK));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 child_file_size = 8000 + 700;
const int64 grandchild_file_size = 60 + 5;
@@ -304,9 +304,8 @@ TEST_F(LocalFileSystemQuotaTest, TestCopySuccessSrcDirRecursive) {
NewOperation()->Copy(
URLForPath(src_dir_path), URLForPath(dest_dir1_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
- expected_usage += all_file_size +
- child_path_cost_ + grandchild_path_cost_;
+ base::MessageLoop::current()->RunUntilIdle();
+ expected_usage += all_file_size + child_path_cost_ + grandchild_path_cost_;
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(DirectoryExists(src_dir_path.Append(
@@ -331,7 +330,7 @@ TEST_F(LocalFileSystemQuotaTest, TestCopySuccessSrcDirRecursive) {
NewOperation()->Copy(
URLForPath(child_dir_path_), URLForPath(dest_dir2_path),
RecordStatusCallback());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
expected_usage += grandchild_file_size + grandchild_path_cost_;
diff --git a/webkit/fileapi/local_file_system_test_helper.cc b/webkit/fileapi/local_file_system_test_helper.cc
index 7ea8957..7cead72 100644
--- a/webkit/fileapi/local_file_system_test_helper.cc
+++ b/webkit/fileapi/local_file_system_test_helper.cc
@@ -79,7 +79,7 @@ void LocalFileSystemTestOriginHelper::SetUp(
void LocalFileSystemTestOriginHelper::TearDown() {
file_system_context_ = NULL;
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
base::FilePath LocalFileSystemTestOriginHelper::GetOriginRootPath() const {
diff --git a/webkit/fileapi/local_file_util_unittest.cc b/webkit/fileapi/local_file_util_unittest.cc
index 0bbe225..8f175fe 100644
--- a/webkit/fileapi/local_file_util_unittest.cc
+++ b/webkit/fileapi/local_file_util_unittest.cc
@@ -103,7 +103,7 @@ class LocalFileUtilTest : public testing::Test {
private:
scoped_ptr<LocalFileUtil> local_file_util_;
base::ScopedTempDir data_dir_;
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
LocalFileSystemTestOriginHelper test_helper_;
DISALLOW_COPY_AND_ASSIGN(LocalFileUtilTest);
diff --git a/webkit/fileapi/obfuscated_file_util_unittest.cc b/webkit/fileapi/obfuscated_file_util_unittest.cc
index 3bb90b8..cbcc2d8 100644
--- a/webkit/fileapi/obfuscated_file_util_unittest.cc
+++ b/webkit/fileapi/obfuscated_file_util_unittest.cc
@@ -242,7 +242,7 @@ class ObfuscatedFileUtilTest : public testing::Test {
}
int64 SizeInUsageFile() {
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
int64 usage = 0;
return usage_cache()->GetUsage(test_helper_.GetUsageCachePath(), &usage) ?
usage : -1;
@@ -369,7 +369,7 @@ class ObfuscatedFileUtilTest : public testing::Test {
expected_usage_(expected_usage) {}
~UsageVerifyHelper() {
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
Check();
}
@@ -655,7 +655,7 @@ class ObfuscatedFileUtilTest : public testing::Test {
private:
base::ScopedTempDir data_dir_;
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
scoped_refptr<quota::QuotaManager> quota_manager_;
scoped_refptr<FileSystemContext> file_system_context_;
GURL origin_;
diff --git a/webkit/fileapi/sandbox_mount_point_provider_unittest.cc b/webkit/fileapi/sandbox_mount_point_provider_unittest.cc
index c095640..cf74947 100644
--- a/webkit/fileapi/sandbox_mount_point_provider_unittest.cc
+++ b/webkit/fileapi/sandbox_mount_point_provider_unittest.cc
@@ -58,7 +58,7 @@ class SandboxMountPointProviderOriginEnumeratorTest : public testing::Test {
}
base::ScopedTempDir data_dir_;
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
scoped_ptr<SandboxMountPointProvider> sandbox_provider_;
};
@@ -117,7 +117,7 @@ TEST_F(SandboxMountPointProviderOriginEnumeratorTest, EnumerateOrigins) {
}
TEST(SandboxMountPointProviderTest, AccessPermissions) {
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
SandboxMountPointProvider provider(
NULL, base::MessageLoopProxy::current(), base::FilePath(),
CreateAllowFileAccessOptions(), NULL);
diff --git a/webkit/fileapi/syncable/canned_syncable_file_system.cc b/webkit/fileapi/syncable/canned_syncable_file_system.cc
index 5c2e526..32c50c7 100644
--- a/webkit/fileapi/syncable/canned_syncable_file_system.cc
+++ b/webkit/fileapi/syncable/canned_syncable_file_system.cc
@@ -40,7 +40,7 @@ namespace sync_file_system {
namespace {
-void Quit() { MessageLoop::current()->Quit(); }
+void Quit() { base::MessageLoop::current()->Quit(); }
template <typename R>
void AssignAndQuit(base::TaskRunner* original_task_runner,
@@ -61,7 +61,7 @@ R RunOnThread(
base::Bind(task, base::Bind(&AssignAndQuit<R>,
base::MessageLoopProxy::current(),
&result)));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
return result;
}
@@ -74,7 +74,7 @@ void RunOnThread(base::SingleThreadTaskRunner* task_runner,
base::Bind(&base::MessageLoopProxy::PostTask,
base::MessageLoopProxy::current(),
FROM_HERE, base::Bind(&Quit)))));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
void EnsureRunningOn(base::SingleThreadTaskRunner* runner) {
@@ -133,8 +133,10 @@ class WriteHelper {
blob_data_(new ScopedTextBlob(*request_context, blob_url, blob_data)) {}
~WriteHelper() {
- if (request_context_)
- MessageLoop::current()->DeleteSoon(FROM_HERE, request_context_.release());
+ if (request_context_) {
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE,
+ request_context_.release());
+ }
}
void DidWrite(const base::Callback<void(int64 result)>& completion_callback,
@@ -250,7 +252,7 @@ PlatformFileError CannedSyncableFileSystem::OpenFileSystem() {
service_name_, origin_, type_, true /* create */,
base::Bind(&CannedSyncableFileSystem::DidOpenFileSystem,
base::Unretained(this)));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
if (file_system_context_->sync_context()) {
// Register 'this' as a sync status observer.
RunOnThread(io_task_runner_,
@@ -281,7 +283,7 @@ SyncStatusCode CannedSyncableFileSystem::MaybeInitializeFileSystemContext(
origin_, service_name_, file_system_context_,
base::Bind(&CannedSyncableFileSystem::DidInitializeFileSystemContext,
base::Unretained(this)));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
return sync_status_;
}
@@ -587,13 +589,13 @@ void CannedSyncableFileSystem::DidOpenFileSystem(
result_ = result;
root_url_ = root;
is_filesystem_opened_ = true;
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
void CannedSyncableFileSystem::DidInitializeFileSystemContext(
SyncStatusCode status) {
sync_status_ = status;
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
void CannedSyncableFileSystem::InitializeSyncStatusObserver() {
diff --git a/webkit/fileapi/syncable/local_file_change_tracker_unittest.cc b/webkit/fileapi/syncable/local_file_change_tracker_unittest.cc
index 083ec45..7e28376 100644
--- a/webkit/fileapi/syncable/local_file_change_tracker_unittest.cc
+++ b/webkit/fileapi/syncable/local_file_change_tracker_unittest.cc
@@ -34,8 +34,9 @@ namespace sync_file_system {
class LocalFileChangeTrackerTest : public testing::Test {
public:
LocalFileChangeTrackerTest()
- : message_loop_(MessageLoop::TYPE_IO),
- file_system_(GURL("http://example.com"), "test",
+ : message_loop_(base::MessageLoop::TYPE_IO),
+ file_system_(GURL("http://example.com"),
+ "test",
base::MessageLoopProxy::current(),
base::MessageLoopProxy::current()) {}
@@ -98,7 +99,7 @@ class LocalFileChangeTrackerTest : public testing::Test {
change_tracker()->CollectLastDirtyChanges(file_system_context());
}
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
CannedSyncableFileSystem file_system_;
scoped_refptr<LocalFileSyncContext> sync_context_;
diff --git a/webkit/fileapi/syncable/local_file_sync_context_unittest.cc b/webkit/fileapi/syncable/local_file_sync_context_unittest.cc
index 5f5b820..a2f83ee 100644
--- a/webkit/fileapi/syncable/local_file_sync_context_unittest.cc
+++ b/webkit/fileapi/syncable/local_file_sync_context_unittest.cc
@@ -59,12 +59,12 @@ class LocalFileSyncContextTest : public testing::Test {
io_thread_.reset(new base::Thread("Thread_IO"));
io_thread_->StartWithOptions(
- base::Thread::Options(MessageLoop::TYPE_IO, 0));
+ base::Thread::Options(base::MessageLoop::TYPE_IO, 0));
file_thread_.reset(new base::Thread("Thread_File"));
file_thread_->Start();
- ui_task_runner_ = MessageLoop::current()->message_loop_proxy();
+ ui_task_runner_ = base::MessageLoop::current()->message_loop_proxy();
io_task_runner_ = io_thread_->message_loop_proxy();
file_task_runner_ = file_thread_->message_loop_proxy();
}
@@ -95,7 +95,7 @@ class LocalFileSyncContextTest : public testing::Test {
SyncFileMetadata* metadata,
FileChangeList* changes) {
StartPrepareForSync(file_system_context, url, metadata, changes);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
return status_;
}
@@ -118,7 +118,7 @@ class LocalFileSyncContextTest : public testing::Test {
status_ = status;
*metadata_out = sync_file_info.metadata;
*changes_out = sync_file_info.changes;
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
SyncStatusCode ApplyRemoteChange(FileSystemContext* file_system_context,
@@ -141,12 +141,12 @@ class LocalFileSyncContextTest : public testing::Test {
file_system_context, change, local_path, url,
base::Bind(&LocalFileSyncContextTest::DidApplyRemoteChange,
base::Unretained(this)));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
return status_;
}
void DidApplyRemoteChange(SyncStatusCode status) {
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
status_ = status;
}
@@ -171,7 +171,7 @@ class LocalFileSyncContextTest : public testing::Test {
base::PlatformFileError WaitUntilModifyFileIsDone() {
while (!async_modify_finished_)
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return file_error_;
}
@@ -192,7 +192,7 @@ class LocalFileSyncContextTest : public testing::Test {
// These need to remain until the very end.
scoped_ptr<base::Thread> io_thread_;
scoped_ptr<base::Thread> file_thread_;
- MessageLoop loop_;
+ base::MessageLoop loop_;
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
@@ -373,7 +373,7 @@ TEST_F(LocalFileSyncContextTest, PrepareSyncWhileWriting) {
// The PrepareForSync must have been started; wait until DidPrepareForSync
// is done.
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
ASSERT_FALSE(has_inflight_prepare_for_sync_);
// Now PrepareForSync should have run and returned OK.
diff --git a/webkit/fileapi/syncable/syncable_file_operation_runner_unittest.cc b/webkit/fileapi/syncable/syncable_file_operation_runner_unittest.cc
index 78497e9..b6c45fe 100644
--- a/webkit/fileapi/syncable/syncable_file_operation_runner_unittest.cc
+++ b/webkit/fileapi/syncable/syncable_file_operation_runner_unittest.cc
@@ -44,7 +44,7 @@ class SyncableFileOperationRunnerTest : public testing::Test {
// Use the current thread as IO thread so that we can directly call
// operations in the tests.
SyncableFileOperationRunnerTest()
- : message_loop_(MessageLoop::TYPE_IO),
+ : message_loop_(base::MessageLoop::TYPE_IO),
file_system_(GURL("http://example.com"), kServiceName,
base::MessageLoopProxy::current(),
base::MessageLoopProxy::current()),
@@ -127,7 +127,7 @@ class SyncableFileOperationRunnerTest : public testing::Test {
base::ScopedTempDir dir_;
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
CannedSyncableFileSystem file_system_;
scoped_refptr<LocalFileSyncContext> sync_context_;
@@ -155,13 +155,13 @@ TEST_F(SyncableFileOperationRunnerTest, SimpleQueue) {
file_system_.NewOperation()->Truncate(
URL(kFile), 1,
ExpectStatus(FROM_HERE, base::PLATFORM_FILE_OK));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, callback_count_);
// Read operations are not blocked (and are executed before queued ones).
file_system_.NewOperation()->FileExists(
URL(kFile), ExpectStatus(FROM_HERE, base::PLATFORM_FILE_ERROR_NOT_FOUND));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, callback_count_);
// End syncing (to enable write).
@@ -169,14 +169,14 @@ TEST_F(SyncableFileOperationRunnerTest, SimpleQueue) {
ASSERT_TRUE(sync_status()->IsWritable(URL(kFile)));
ResetCallbackStatus();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(2, callback_count_);
// Now the file must have been created and updated.
ResetCallbackStatus();
file_system_.NewOperation()->FileExists(
URL(kFile), ExpectStatus(FROM_HERE, base::PLATFORM_FILE_OK));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, callback_count_);
}
@@ -196,13 +196,13 @@ TEST_F(SyncableFileOperationRunnerTest, WriteToParentAndChild) {
file_system_.NewOperation()->Remove(
URL(kParent), true /* recursive */,
ExpectStatus(FROM_HERE, base::PLATFORM_FILE_OK));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, callback_count_);
// Read operations are not blocked (and are executed before queued ones).
file_system_.NewOperation()->DirectoryExists(
URL(kDir), ExpectStatus(FROM_HERE, base::PLATFORM_FILE_OK));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, callback_count_);
// Writes to unrelated files must succeed as well.
@@ -210,7 +210,7 @@ TEST_F(SyncableFileOperationRunnerTest, WriteToParentAndChild) {
file_system_.NewOperation()->CreateDirectory(
URL(kOther), false /* exclusive */, false /* recursive */,
ExpectStatus(FROM_HERE, base::PLATFORM_FILE_OK));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, callback_count_);
// End syncing (to enable write).
@@ -218,7 +218,7 @@ TEST_F(SyncableFileOperationRunnerTest, WriteToParentAndChild) {
ASSERT_TRUE(sync_status()->IsWritable(URL(kDir)));
ResetCallbackStatus();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(2, callback_count_);
}
@@ -239,7 +239,7 @@ TEST_F(SyncableFileOperationRunnerTest, CopyAndMove) {
file_system_.NewOperation()->Move(
URL(kDir), URL("dest-move"),
ExpectStatus(FROM_HERE, base::PLATFORM_FILE_OK));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, callback_count_);
// Only "dest-copy1" should exist.
@@ -256,13 +256,13 @@ TEST_F(SyncableFileOperationRunnerTest, CopyAndMove) {
file_system_.NewOperation()->Copy(
URL(kDir), URL("dest-copy2"),
ExpectStatus(FROM_HERE, base::PLATFORM_FILE_OK));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, callback_count_);
// Finish syncing the "dest-copy2" directory to unlock Copy.
sync_status()->EndSyncing(URL("dest-copy2"));
ResetCallbackStatus();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, callback_count_);
// Now we should have "dest-copy2".
@@ -272,7 +272,7 @@ TEST_F(SyncableFileOperationRunnerTest, CopyAndMove) {
// Finish syncing the kParent to unlock Move.
sync_status()->EndSyncing(URL(kParent));
ResetCallbackStatus();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, callback_count_);
// Now we should have "dest-move".
@@ -292,14 +292,14 @@ TEST_F(SyncableFileOperationRunnerTest, Write) {
file_system_.NewOperation()->Write(
&url_request_context_,
URL(kFile), kBlobURL, 0, GetWriteCallback(FROM_HERE));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, callback_count_);
sync_status()->EndSyncing(URL(kFile));
ResetCallbackStatus();
while (!write_complete_)
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, write_status_);
EXPECT_EQ(kData.size(), write_bytes_);
@@ -317,7 +317,7 @@ TEST_F(SyncableFileOperationRunnerTest, QueueAndCancel) {
file_system_.NewOperation()->Truncate(
URL(kFile), 1,
ExpectStatus(FROM_HERE, base::PLATFORM_FILE_ERROR_ABORT));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, callback_count_);
ResetCallbackStatus();
@@ -325,7 +325,7 @@ TEST_F(SyncableFileOperationRunnerTest, QueueAndCancel) {
// This shouldn't crash nor leak memory.
sync_context_->ShutdownOnUIThread();
sync_context_ = NULL;
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(2, callback_count_);
}
@@ -348,7 +348,7 @@ TEST_F(SyncableFileOperationRunnerTest, CopyInForeignFile) {
file_system_.NewOperation()->AsLocalFileSystemOperation()->CopyInForeignFile(
temp_path, URL(kFile),
ExpectStatus(FROM_HERE, base::PLATFORM_FILE_OK));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, callback_count_);
// End syncing (to enable write).
@@ -356,7 +356,7 @@ TEST_F(SyncableFileOperationRunnerTest, CopyInForeignFile) {
ASSERT_TRUE(sync_status()->IsWritable(URL(kFile)));
ResetCallbackStatus();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, callback_count_);
// Now the file must have been created and have the same content as temp_path.
@@ -364,7 +364,7 @@ TEST_F(SyncableFileOperationRunnerTest, CopyInForeignFile) {
file_system_.DoVerifyFile(
URL(kFile), kTestData,
ExpectStatus(FROM_HERE, base::PLATFORM_FILE_OK));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, callback_count_);
}
diff --git a/webkit/fileapi/syncable/syncable_file_system_unittest.cc b/webkit/fileapi/syncable/syncable_file_system_unittest.cc
index ec00e763..30d2a40 100644
--- a/webkit/fileapi/syncable/syncable_file_system_unittest.cc
+++ b/webkit/fileapi/syncable/syncable_file_system_unittest.cc
@@ -90,7 +90,7 @@ class SyncableFileSystemTest : public testing::Test {
}
base::ScopedTempDir data_dir_;
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
CannedSyncableFileSystem file_system_;
scoped_refptr<LocalFileSyncContext> sync_context_;
diff --git a/webkit/fileapi/syncable/syncable_file_system_util_unittest.cc b/webkit/fileapi/syncable/syncable_file_system_util_unittest.cc
index 0302cf4..3cc8949 100644
--- a/webkit/fileapi/syncable/syncable_file_system_util_unittest.cc
+++ b/webkit/fileapi/syncable/syncable_file_system_util_unittest.cc
@@ -114,7 +114,7 @@ TEST(SyncableFileSystemUtilTest, SerializeBeforeOpenFileSystem) {
const std::string serialized = kSyncableFileSystemRootURI +
CreateNormalizedFilePath(kPath).AsUTF8Unsafe();
FileSystemURL deserialized;
- MessageLoop message_loop;
+ base::MessageLoop message_loop;
// Setting up a full syncable filesystem environment.
CannedSyncableFileSystem file_system(GURL(kOrigin), kServiceName,
@@ -143,7 +143,7 @@ TEST(SyncableFileSystemUtilTest, SerializeBeforeOpenFileSystem) {
RevokeSyncableFileSystem(kServiceName);
sync_context->ShutdownOnUIThread();
sync_context = NULL;
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
} // namespace sync_file_system
diff --git a/webkit/fileapi/upload_file_system_file_element_reader_unittest.cc b/webkit/fileapi/upload_file_system_file_element_reader_unittest.cc
index 03ab992..ddf78a1 100644
--- a/webkit/fileapi/upload_file_system_file_element_reader_unittest.cc
+++ b/webkit/fileapi/upload_file_system_file_element_reader_unittest.cc
@@ -29,7 +29,7 @@ const fileapi::FileSystemType kFileSystemType =
class UploadFileSystemFileElementReaderTest : public testing::Test {
public:
UploadFileSystemFileElementReaderTest()
- : message_loop_(MessageLoop::TYPE_IO) {}
+ : message_loop_(base::MessageLoop::TYPE_IO) {}
virtual void SetUp() OVERRIDE {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
@@ -43,7 +43,7 @@ class UploadFileSystemFileElementReaderTest : public testing::Test {
true, // create
base::Bind(&UploadFileSystemFileElementReaderTest::OnValidateFileSystem,
base::Unretained(this)));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_TRUE(file_system_root_url_.is_valid());
// Prepare a file on file system.
@@ -117,7 +117,7 @@ class UploadFileSystemFileElementReaderTest : public testing::Test {
file_system_root_url_ = root;
}
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
base::ScopedTempDir temp_dir_;
scoped_refptr<FileSystemContext> file_system_context_;
GURL file_system_root_url_;
diff --git a/webkit/glue/resource_request_body_unittest.cc b/webkit/glue/resource_request_body_unittest.cc
index 70cecef..913414c 100644
--- a/webkit/glue/resource_request_body_unittest.cc
+++ b/webkit/glue/resource_request_body_unittest.cc
@@ -55,7 +55,7 @@ bool AreElementsEqual(const net::UploadElementReader& reader,
} // namespace
TEST(ResourceRequestBodyTest, CreateUploadDataStreamWithoutBlob) {
- MessageLoop message_loop;
+ base::MessageLoop message_loop;
scoped_refptr<ResourceRequestBody> request_body = new ResourceRequestBody;
const char kData[] = "123";
@@ -92,7 +92,7 @@ TEST(ResourceRequestBodyTest, CreateUploadDataStreamWithoutBlob) {
}
TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
- MessageLoop message_loop;
+ base::MessageLoop message_loop;
// Setup blob data for testing.
base::Time time1, time2;
base::Time::FromString("Tue, 15 Nov 1994, 12:45:26 GMT", &time1);
diff --git a/webkit/glue/webkit_glue_unittest.cc b/webkit/glue/webkit_glue_unittest.cc
index cca4497..c4b9776 100644
--- a/webkit/glue/webkit_glue_unittest.cc
+++ b/webkit/glue/webkit_glue_unittest.cc
@@ -114,7 +114,7 @@ class TestWebKitPlatformSupport
};
TEST(WebkitGlueTest, SuspendResumeSharedTimer) {
- MessageLoop message_loop;
+ base::MessageLoop message_loop;
TestWebKitPlatformSupport platform_support;
// Set a timer to fire as soon as possible.
diff --git a/webkit/glue/webkitplatformsupport_impl.cc b/webkit/glue/webkitplatformsupport_impl.cc
index 3ceafa6..97c5989 100644
--- a/webkit/glue/webkitplatformsupport_impl.cc
+++ b/webkit/glue/webkitplatformsupport_impl.cc
@@ -366,15 +366,14 @@ static int ToMessageID(WebLocalizedString::Name name) {
}
WebKitPlatformSupportImpl::WebKitPlatformSupportImpl()
- : main_loop_(MessageLoop::current()),
+ : main_loop_(base::MessageLoop::current()),
shared_timer_func_(NULL),
shared_timer_fire_time_(0.0),
shared_timer_fire_time_was_set_while_suspended_(false),
shared_timer_suspended_(0),
current_thread_slot_(&DestroyCurrentThread),
compositor_support_(new webkit::WebCompositorSupportImpl),
- fling_curve_configuration_(new FlingCurveConfiguration) {
-}
+ fling_curve_configuration_(new FlingCurveConfiguration) {}
WebKitPlatformSupportImpl::~WebKitPlatformSupportImpl() {
}
diff --git a/webkit/glue/webthread_impl.cc b/webkit/glue/webthread_impl.cc
index bbc2429..edd6159 100644
--- a/webkit/glue/webthread_impl.cc
+++ b/webkit/glue/webthread_impl.cc
@@ -18,8 +18,9 @@ namespace webkit_glue {
WebThreadBase::WebThreadBase() { }
WebThreadBase::~WebThreadBase() { }
-class WebThreadBase::TaskObserverAdapter : public MessageLoop::TaskObserver {
-public:
+class WebThreadBase::TaskObserverAdapter :
+ public base::MessageLoop::TaskObserver {
+ public:
TaskObserverAdapter(WebThread::TaskObserver* observer)
: observer_(observer) { }
@@ -41,7 +42,7 @@ void WebThreadBase::addTaskObserver(TaskObserver* observer) {
std::make_pair(observer, static_cast<TaskObserverAdapter*>(NULL)));
if (result.second)
result.first->second = new TaskObserverAdapter(observer);
- MessageLoop::current()->AddTaskObserver(result.first->second);
+ base::MessageLoop::current()->AddTaskObserver(result.first->second);
}
void WebThreadBase::removeTaskObserver(TaskObserver* observer) {
@@ -49,7 +50,7 @@ void WebThreadBase::removeTaskObserver(TaskObserver* observer) {
TaskObserverMap::iterator iter = task_observer_map_.find(observer);
if (iter == task_observer_map_.end())
return;
- MessageLoop::current()->RemoveTaskObserver(iter->second);
+ base::MessageLoop::current()->RemoveTaskObserver(iter->second);
delete iter->second;
task_observer_map_.erase(iter);
}
@@ -112,14 +113,15 @@ void WebThreadImplForMessageLoop::postDelayedTask(
void WebThreadImplForMessageLoop::enterRunLoop() {
CHECK(IsCurrentThread());
- CHECK(!MessageLoop::current()->is_running()); // We don't support nesting.
- MessageLoop::current()->Run();
+ CHECK(!base::MessageLoop::current()
+ ->is_running()); // We don't support nesting.
+ base::MessageLoop::current()->Run();
}
void WebThreadImplForMessageLoop::exitRunLoop() {
CHECK(IsCurrentThread());
- CHECK(MessageLoop::current()->is_running());
- MessageLoop::current()->Quit();
+ CHECK(base::MessageLoop::current()->is_running());
+ base::MessageLoop::current()->Quit();
}
bool WebThreadImplForMessageLoop::IsCurrentThread() const {
diff --git a/webkit/glue/webthread_impl.h b/webkit/glue/webthread_impl.h
index f84b994..225ea9b 100644
--- a/webkit/glue/webthread_impl.h
+++ b/webkit/glue/webthread_impl.h
@@ -43,7 +43,7 @@ class WebThreadImpl : public WebThreadBase {
virtual void enterRunLoop();
virtual void exitRunLoop();
- MessageLoop* message_loop() const { return thread_->message_loop(); }
+ base::MessageLoop* message_loop() const { return thread_->message_loop(); }
private:
virtual bool IsCurrentThread() const OVERRIDE;
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc
index 39e2617..464f018 100644
--- a/webkit/glue/weburlloader_impl.cc
+++ b/webkit/glue/weburlloader_impl.cc
@@ -444,8 +444,8 @@ void WebURLLoaderImpl::Context::Start(
&sync_load_response->error_code);
} else {
AddRef(); // Balanced in OnCompletedRequest
- MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(&Context::HandleDataURL, this));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE, base::Bind(&Context::HandleDataURL, this));
}
return;
}
diff --git a/webkit/plugins/npapi/plugin_instance.cc b/webkit/plugins/npapi/plugin_instance.cc
index 8e61f70..34ae501 100644
--- a/webkit/plugins/npapi/plugin_instance.cc
+++ b/webkit/plugins/npapi/plugin_instance.cc
@@ -27,7 +27,7 @@
namespace webkit {
namespace npapi {
-PluginInstance::PluginInstance(PluginLib *plugin, const std::string &mime_type)
+PluginInstance::PluginInstance(PluginLib* plugin, const std::string& mime_type)
: plugin_(plugin),
npp_(0),
host_(PluginHost::Singleton()),
@@ -52,7 +52,7 @@ PluginInstance::PluginInstance(PluginLib *plugin, const std::string &mime_type)
#endif
currently_handled_event_(NULL),
#endif
- message_loop_(MessageLoop::current()),
+ message_loop_(base::MessageLoop::current()),
load_manually_(false),
in_close_streams_(false),
next_timer_id_(1),
@@ -463,7 +463,7 @@ uint32 PluginInstance::ScheduleTimer(uint32 interval,
timers_[timer_id] = info;
// Schedule the callback.
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&PluginInstance::OnTimerCall, this, func, npp_, timer_id),
base::TimeDelta::FromMilliseconds(interval));
@@ -505,7 +505,7 @@ void PluginInstance::OnTimerCall(void (*func)(NPP id, uint32 timer_id),
// Reschedule repeating timers after invoking the callback so callback is not
// re-entered if it pumps the message loop.
if (info.repeat) {
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&PluginInstance::OnTimerCall, this, func, npp_, timer_id),
base::TimeDelta::FromMilliseconds(info.interval));
diff --git a/webkit/plugins/npapi/plugin_lib.cc b/webkit/plugins/npapi/plugin_lib.cc
index 7b927e0..dce2e99 100644
--- a/webkit/plugins/npapi/plugin_lib.cc
+++ b/webkit/plugins/npapi/plugin_lib.cc
@@ -312,7 +312,7 @@ void PluginLib::Unload() {
LOG_IF(ERROR, PluginList::DebugPluginLoading())
<< "Scheduling delayed unload for plugin "
<< web_plugin_info_.path.value();
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&FreePluginLibraryHelper,
web_plugin_info_.path,
diff --git a/webkit/plugins/npapi/plugin_stream.cc b/webkit/plugins/npapi/plugin_stream.cc
index 543ab3e..1769b68 100644
--- a/webkit/plugins/npapi/plugin_stream.cc
+++ b/webkit/plugins/npapi/plugin_stream.cc
@@ -175,7 +175,7 @@ bool PluginStream::WriteToPlugin(const char* buf, const int length,
delivery_data_.resize(previous_size + remaining);
data_offset_ = data_offset;
memcpy(&delivery_data_[previous_size], buf + written, remaining);
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&PluginStream::OnDelayDelivery, this));
}
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl.cc b/webkit/plugins/npapi/webplugin_delegate_impl.cc
index 5011e3c..e1540ee 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl.cc
+++ b/webkit/plugins/npapi/webplugin_delegate_impl.cc
@@ -40,7 +40,7 @@ WebPluginDelegateImpl* WebPluginDelegateImpl::Create(
void WebPluginDelegateImpl::PluginDestroyed() {
if (handle_event_depth_) {
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
} else {
delete this;
}
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_win.cc b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc
index 03c1215..9739ca6 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl_win.cc
+++ b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc
@@ -657,8 +657,9 @@ void WebPluginDelegateImpl::OnThrottleMessage() {
}
if (!throttle_queue_was_empty) {
- MessageLoop::current()->PostDelayedTask(
- FROM_HERE, base::Bind(&WebPluginDelegateImpl::OnThrottleMessage),
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&WebPluginDelegateImpl::OnThrottleMessage),
base::TimeDelta::FromMilliseconds(kFlashWMUSERMessageThrottleDelayMs));
}
}
@@ -680,8 +681,9 @@ void WebPluginDelegateImpl::ThrottleMessage(WNDPROC proc, HWND hwnd,
throttle_queue->push_back(msg);
if (throttle_queue->size() == 1) {
- MessageLoop::current()->PostDelayedTask(
- FROM_HERE, base::Bind(&WebPluginDelegateImpl::OnThrottleMessage),
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&WebPluginDelegateImpl::OnThrottleMessage),
base::TimeDelta::FromMilliseconds(kFlashWMUSERMessageThrottleDelayMs));
}
}
@@ -1036,7 +1038,7 @@ LRESULT CALLBACK WebPluginDelegateImpl::NativeWndProc(
delegate->instance()->PushPopupsEnabledState(true);
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&WebPluginDelegateImpl::OnUserGestureEnd,
delegate->user_gesture_msg_factory_.GetWeakPtr()),
@@ -1317,7 +1319,7 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent(
}
bool old_task_reentrancy_state =
- MessageLoop::current()->NestableTasksAllowed();
+ base::MessageLoop::current()->NestableTasksAllowed();
// Maintain a local/global stack for the g_current_plugin_instance variable
// as this may be a nested invocation.
@@ -1369,8 +1371,9 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent(
// Restore the nestable tasks allowed state in the message loop and reset
// the os modal loop state as the plugin returned from the TrackPopupMenu
// API call.
- MessageLoop::current()->SetNestableTasksAllowed(old_task_reentrancy_state);
- MessageLoop::current()->set_os_modal_loop(false);
+ base::MessageLoop::current()->SetNestableTasksAllowed(
+ old_task_reentrancy_state);
+ base::MessageLoop::current()->set_os_modal_loop(false);
// The Flash plugin at times sets focus to its hidden top level window
// with class name SWFlash_PlaceholderX. This causes the chrome browser
// window to receive a WM_ACTIVATEAPP message as a top level window from
@@ -1400,8 +1403,8 @@ void WebPluginDelegateImpl::OnModalLoopEntered() {
DCHECK(handle_event_pump_messages_event_ != NULL);
SetEvent(handle_event_pump_messages_event_);
- MessageLoop::current()->SetNestableTasksAllowed(true);
- MessageLoop::current()->set_os_modal_loop(true);
+ base::MessageLoop::current()->SetNestableTasksAllowed(true);
+ base::MessageLoop::current()->set_os_modal_loop(true);
UnhookWindowsHookEx(handle_event_message_filter_hook_);
handle_event_message_filter_hook_ = NULL;
diff --git a/webkit/plugins/npapi/webplugin_impl.cc b/webkit/plugins/npapi/webplugin_impl.cc
index 784e3fb..494eaee 100644
--- a/webkit/plugins/npapi/webplugin_impl.cc
+++ b/webkit/plugins/npapi/webplugin_impl.cc
@@ -270,7 +270,7 @@ bool WebPluginImpl::initialize(WebPluginContainer* container) {
void WebPluginImpl::destroy() {
SetContainer(NULL);
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
NPObject* WebPluginImpl::scriptableObject() {
@@ -349,9 +349,10 @@ void WebPluginImpl::updateGeometry(
// geometry received by a call to setFrameRect in the Webkit
// layout code path. To workaround this issue we download the
// plugin source url on a timer.
- MessageLoop::current()->PostTask(
- FROM_HERE, base::Bind(&WebPluginImpl::OnDownloadPluginSrcUrl,
- weak_factory_.GetWeakPtr()));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&WebPluginImpl::OnDownloadPluginSrcUrl,
+ weak_factory_.GetWeakPtr()));
}
}
diff --git a/webkit/plugins/ppapi/message_channel.cc b/webkit/plugins/ppapi/message_channel.cc
index 4a9fdd0..bab0cf8 100644
--- a/webkit/plugins/ppapi/message_channel.cc
+++ b/webkit/plugins/ppapi/message_channel.cc
@@ -378,7 +378,7 @@ void MessageChannel::PostMessageToJavaScript(PP_Var message_data) {
PostMessageToJavaScriptImpl(serialized_val);
}
} else {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&MessageChannel::PostMessageToJavaScriptImpl,
weak_ptr_factory_.GetWeakPtr(),
@@ -391,7 +391,7 @@ void MessageChannel::StopQueueingJavaScriptMessages() {
// since we haven't finished initializing the WebPluginImpl yet, so
// the plugin isn't available in the DOM.
early_message_queue_state_ = DRAIN_PENDING;
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&MessageChannel::DrainEarlyMessageQueue,
weak_ptr_factory_.GetWeakPtr()));
@@ -465,7 +465,8 @@ void MessageChannel::PostMessageToNative(PP_Var message_data) {
// Make a copy of the message data for the Task we will run.
PP_Var var_copy(CopyPPVar(message_data));
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
base::Bind(&MessageChannel::PostMessageToNativeImpl,
weak_ptr_factory_.GetWeakPtr(),
var_copy));
diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc
index 063513c..4835c6a 100644
--- a/webkit/plugins/ppapi/plugin_module.cc
+++ b/webkit/plugins/ppapi/plugin_module.cc
@@ -214,12 +214,13 @@ PP_Bool ReadImageData(PP_Resource device_context_2d,
}
void RunMessageLoop(PP_Instance instance) {
- MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
- MessageLoop::current()->Run();
+ base::MessageLoop::ScopedNestableTaskAllower allow(
+ base::MessageLoop::current());
+ base::MessageLoop::current()->Run();
}
void QuitMessageLoop(PP_Instance instance) {
- MessageLoop::current()->QuitNow();
+ base::MessageLoop::current()->QuitNow();
}
uint32_t GetLiveObjectsForInstance(PP_Instance instance_id) {
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 68f41ce..d8cd91c 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -1218,9 +1218,10 @@ bool PluginInstance::IsAcceptingWheelEvents() const {
void PluginInstance::ScheduleAsyncDidChangeView() {
if (view_change_weak_ptr_factory_.HasWeakPtrs())
return; // Already scheduled.
- MessageLoop::current()->PostTask(
- FROM_HERE, base::Bind(&PluginInstance::SendAsyncDidChangeView,
- view_change_weak_ptr_factory_.GetWeakPtr()));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&PluginInstance::SendAsyncDidChangeView,
+ view_change_weak_ptr_factory_.GetWeakPtr()));
}
void PluginInstance::SendAsyncDidChangeView() {
@@ -1492,7 +1493,7 @@ void PluginInstance::FlashSetFullscreen(bool fullscreen, bool delay_report) {
if (!delay_report) {
ReportGeometry();
} else {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&PluginInstance::ReportGeometry, this));
}
}
@@ -2319,7 +2320,8 @@ void PluginInstance::SelectionChanged(PP_Instance instance) {
// uses a weak pointer rather than exploiting the fact that this class is
// refcounted because we don't actually want this operation to affect the
// lifetime of the instance.
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
base::Bind(&PluginInstance::RequestSurroundingText,
AsWeakPtr(),
static_cast<size_t>(kExtraCharsForTextInput)));
diff --git a/webkit/plugins/ppapi/ppapi_webplugin_impl.cc b/webkit/plugins/ppapi/ppapi_webplugin_impl.cc
index 4dd8317..7257f2e 100644
--- a/webkit/plugins/ppapi/ppapi_webplugin_impl.cc
+++ b/webkit/plugins/ppapi/ppapi_webplugin_impl.cc
@@ -123,7 +123,7 @@ void WebPluginImpl::destroy() {
instance_ = NULL;
}
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
NPObject* WebPluginImpl::scriptableObject() {
diff --git a/webkit/plugins/ppapi/ppb_flash_message_loop_impl.cc b/webkit/plugins/ppapi/ppb_flash_message_loop_impl.cc
index 647e1a8..2852789 100644
--- a/webkit/plugins/ppapi/ppb_flash_message_loop_impl.cc
+++ b/webkit/plugins/ppapi/ppb_flash_message_loop_impl.cc
@@ -88,8 +88,9 @@ int32_t PPB_Flash_MessageLoop_Impl::InternalRun(
// destroyed when the nested message loop exits.
scoped_refptr<State> state_protector(state_);
{
- MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
- MessageLoop::current()->Run();
+ base::MessageLoop::ScopedNestableTaskAllower allow(
+ base::MessageLoop::current());
+ base::MessageLoop::current()->Run();
}
// Don't access data members of the class below.
@@ -102,7 +103,7 @@ void PPB_Flash_MessageLoop_Impl::InternalQuit(int32_t result) {
state_->set_quit_called();
state_->set_result(result);
- MessageLoop::current()->QuitNow();
+ base::MessageLoop::current()->QuitNow();
if (!state_->run_callback().is_null())
state_->run_callback().Run(result);
diff --git a/webkit/plugins/ppapi/ppb_graphics_3d_impl.cc b/webkit/plugins/ppapi/ppb_graphics_3d_impl.cc
index 713e210..a0b203a 100644
--- a/webkit/plugins/ppapi/ppb_graphics_3d_impl.cc
+++ b/webkit/plugins/ppapi/ppb_graphics_3d_impl.cc
@@ -319,8 +319,10 @@ void PPB_Graphics3D_Impl::OnContextLost() {
// Send context lost to plugin. This may have been caused by a PPAPI call, so
// avoid re-entering.
- MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
- &PPB_Graphics3D_Impl::SendContextLost, weak_ptr_factory_.GetWeakPtr()));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&PPB_Graphics3D_Impl::SendContextLost,
+ weak_ptr_factory_.GetWeakPtr()));
}
void PPB_Graphics3D_Impl::SendContextLost() {
diff --git a/webkit/plugins/ppapi/ppb_scrollbar_impl.cc b/webkit/plugins/ppapi/ppb_scrollbar_impl.cc
index 38192164..fee5df6 100644
--- a/webkit/plugins/ppapi/ppb_scrollbar_impl.cc
+++ b/webkit/plugins/ppapi/ppb_scrollbar_impl.cc
@@ -217,7 +217,7 @@ void PPB_Scrollbar_Impl::invalidateScrollbarRect(
// Note: we use a WeakPtrFactory here so that a lingering callback can not
// modify the lifetime of this object. Otherwise, WebKit::WebPluginScrollbar
// could outlive WebKit::WebPluginContainer, which is against its contract.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&PPB_Scrollbar_Impl::NotifyInvalidate,
weak_ptr_factory_.GetWeakPtr()));
diff --git a/webkit/plugins/ppapi/quota_file_io_unittest.cc b/webkit/plugins/ppapi/quota_file_io_unittest.cc
index 1603ad8..e5e38d5 100644
--- a/webkit/plugins/ppapi/quota_file_io_unittest.cc
+++ b/webkit/plugins/ppapi/quota_file_io_unittest.cc
@@ -134,7 +134,7 @@ class QuotaFileIOTest : public PpapiUnittest {
// Write 8 bytes at offset 0 (-> length=8).
std::string data("12345678");
Write(0, data, will_operation);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(1U, num_results());
EXPECT_EQ(static_cast<int>(data.size()), bytes_written().front());
EXPECT_EQ(base::PLATFORM_FILE_OK, status().front());
@@ -155,7 +155,7 @@ class QuotaFileIOTest : public PpapiUnittest {
// Write 5 bytes at offset 5 (-> length=10).
data = "55555";
Write(5, data, will_operation);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(1U, num_results());
EXPECT_EQ(static_cast<int>(data.size()), bytes_written().front());
EXPECT_EQ(base::PLATFORM_FILE_OK, status().front());
@@ -174,7 +174,7 @@ class QuotaFileIOTest : public PpapiUnittest {
// Write 7 bytes at offset 8 (-> length=15).
data = "9012345";
Write(8, data, will_operation);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(1U, num_results());
EXPECT_EQ(static_cast<int>(data.size()), bytes_written().front());
EXPECT_EQ(base::PLATFORM_FILE_OK, status().front());
@@ -193,7 +193,7 @@ class QuotaFileIOTest : public PpapiUnittest {
// Write 2 bytes at offset 2 (-> length=15).
data = "33";
Write(2, data, will_operation);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(1U, num_results());
EXPECT_EQ(static_cast<int>(data.size()), bytes_written().front());
EXPECT_EQ(base::PLATFORM_FILE_OK, status().front());
@@ -211,7 +211,7 @@ class QuotaFileIOTest : public PpapiUnittest {
// Write 4 bytes at offset 20 (-> length=24).
data = "XXXX";
Write(20, data, will_operation);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(1U, num_results());
EXPECT_EQ(static_cast<int>(data.size()), bytes_written().front());
EXPECT_EQ(base::PLATFORM_FILE_OK, status().front());
@@ -232,7 +232,7 @@ class QuotaFileIOTest : public PpapiUnittest {
// Quota error case. Write 7 bytes at offset 23 (-> length is unchanged)
data = "ABCDEFG";
Write(23, data, will_operation);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(1U, num_results());
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NO_SPACE, status().front());
EXPECT_EQ(5, quota_plugin_delegate()->available_space());
@@ -241,7 +241,7 @@ class QuotaFileIOTest : public PpapiUnittest {
// Overlapping write. Write 6 bytes at offset 2 (-> length is unchanged)
data = "ABCDEF";
Write(2, data, will_operation);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(1U, num_results());
EXPECT_EQ(static_cast<int>(data.size()), bytes_written().front());
EXPECT_EQ(base::PLATFORM_FILE_OK, status().front());
@@ -251,7 +251,7 @@ class QuotaFileIOTest : public PpapiUnittest {
// Overlapping + extending the file size, but within the quota.
// Write 6 bytes at offset 23 (-> length=29).
Write(23, data, will_operation);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(1U, num_results());
EXPECT_EQ(static_cast<int>(data.size()), bytes_written().front());
EXPECT_EQ(base::PLATFORM_FILE_OK, status().front());
@@ -270,7 +270,7 @@ class QuotaFileIOTest : public PpapiUnittest {
quota_plugin_delegate()->set_available_space(100);
SetLength(0, will_operation);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(1U, num_results());
EXPECT_EQ(base::PLATFORM_FILE_OK, status().front());
EXPECT_EQ(0, GetPlatformFileSize());
@@ -278,7 +278,7 @@ class QuotaFileIOTest : public PpapiUnittest {
reset_results();
SetLength(8, will_operation);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(1U, num_results());
EXPECT_EQ(base::PLATFORM_FILE_OK, status().front());
EXPECT_EQ(100 - 8, quota_plugin_delegate()->available_space());
@@ -292,7 +292,7 @@ class QuotaFileIOTest : public PpapiUnittest {
}
SetLength(16, will_operation);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(1U, num_results());
EXPECT_EQ(base::PLATFORM_FILE_OK, status().front());
EXPECT_EQ(100 - 16, quota_plugin_delegate()->available_space());
@@ -306,7 +306,7 @@ class QuotaFileIOTest : public PpapiUnittest {
}
SetLength(4, will_operation);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(1U, num_results());
EXPECT_EQ(base::PLATFORM_FILE_OK, status().front());
EXPECT_EQ(100 - 4, quota_plugin_delegate()->available_space());
@@ -320,7 +320,7 @@ class QuotaFileIOTest : public PpapiUnittest {
}
SetLength(0, will_operation);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(1U, num_results());
EXPECT_EQ(base::PLATFORM_FILE_OK, status().front());
EXPECT_EQ(100, quota_plugin_delegate()->available_space());
@@ -337,7 +337,7 @@ class QuotaFileIOTest : public PpapiUnittest {
// Quota error case.
SetLength(7, will_operation);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(1U, num_results());
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NO_SPACE, status().front());
EXPECT_EQ(5, quota_plugin_delegate()->available_space());
@@ -458,7 +458,7 @@ TEST_F(QuotaFileIOTest, ParallelWrites) {
Write(0, data1[0], false);
Write(5, data1[1], false);
Write(8, data1[2], false);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(ARRAYSIZE_UNSAFE(data1), num_results());
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(data1); ++i) {
@@ -479,7 +479,7 @@ TEST_F(QuotaFileIOTest, ParallelWrites) {
};
Write(2, data2[0], false);
Write(20, data2[1], false);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(ARRAYSIZE_UNSAFE(data2), num_results());
EXPECT_EQ(static_cast<int>(data2[0].size()), bytes_written().front());
diff --git a/webkit/plugins/webview_plugin.cc b/webkit/plugins/webview_plugin.cc
index 312c77e..b75a6d9 100644
--- a/webkit/plugins/webview_plugin.cc
+++ b/webkit/plugins/webview_plugin.cc
@@ -109,7 +109,7 @@ void WebViewPlugin::destroy() {
delegate_ = NULL;
}
container_ = NULL;
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
NPObject* WebViewPlugin::scriptableObject() {
diff --git a/webkit/quota/mock_quota_manager.cc b/webkit/quota/mock_quota_manager.cc
index 252459c..5d0e9ba 100644
--- a/webkit/quota/mock_quota_manager.cc
+++ b/webkit/quota/mock_quota_manager.cc
@@ -94,7 +94,7 @@ void MockQuotaManager::GetOriginsModifiedSince(
origins_to_return->insert(current->origin);
}
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&MockQuotaManager::DidGetModifiedSince,
weak_factory_.GetWeakPtr(),
@@ -120,7 +120,7 @@ void MockQuotaManager::DeleteOriginData(
}
}
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&MockQuotaManager::DidDeleteOriginData,
weak_factory_.GetWeakPtr(),
diff --git a/webkit/quota/mock_quota_manager_unittest.cc b/webkit/quota/mock_quota_manager_unittest.cc
index f3146ed..2503129 100644
--- a/webkit/quota/mock_quota_manager_unittest.cc
+++ b/webkit/quota/mock_quota_manager_unittest.cc
@@ -53,7 +53,7 @@ class MockQuotaManagerTest : public testing::Test {
virtual void TearDown() {
// Make sure the quota manager cleans up correctly.
manager_ = NULL;
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
void GetModifiedOrigins(StorageType type, base::Time since) {
@@ -98,7 +98,7 @@ class MockQuotaManagerTest : public testing::Test {
}
private:
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
base::ScopedTempDir data_dir_;
base::WeakPtrFactory<MockQuotaManagerTest> weak_factory_;
scoped_refptr<MockQuotaManager> manager_;
@@ -162,7 +162,7 @@ TEST_F(MockQuotaManagerTest, OriginDeletion) {
base::Time::Now());
DeleteOriginData(kOrigin2, kTemporary, kClientFile);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, deletion_callback_count());
EXPECT_TRUE(manager()->OriginHasData(kOrigin1, kTemporary, kClientFile));
@@ -172,7 +172,7 @@ TEST_F(MockQuotaManagerTest, OriginDeletion) {
EXPECT_TRUE(manager()->OriginHasData(kOrigin3, kTemporary, kClientDB));
DeleteOriginData(kOrigin3, kTemporary, kClientFile | kClientDB);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(2, deletion_callback_count());
EXPECT_TRUE(manager()->OriginHasData(kOrigin1, kTemporary, kClientFile));
@@ -189,13 +189,13 @@ TEST_F(MockQuotaManagerTest, ModifiedOrigins) {
base::TimeDelta a_minute = base::TimeDelta::FromMilliseconds(60000);
GetModifiedOrigins(kTemporary, then);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(origins().empty());
manager()->AddOrigin(kOrigin1, kTemporary, kClientFile, now - an_hour);
GetModifiedOrigins(kTemporary, then);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kTemporary, type());
EXPECT_EQ(1UL, origins().size());
@@ -205,7 +205,7 @@ TEST_F(MockQuotaManagerTest, ModifiedOrigins) {
manager()->AddOrigin(kOrigin2, kTemporary, kClientFile, now);
GetModifiedOrigins(kTemporary, then);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kTemporary, type());
EXPECT_EQ(2UL, origins().size());
@@ -213,7 +213,7 @@ TEST_F(MockQuotaManagerTest, ModifiedOrigins) {
EXPECT_EQ(1UL, origins().count(kOrigin2));
GetModifiedOrigins(kTemporary, now - a_minute);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kTemporary, type());
EXPECT_EQ(1UL, origins().size());
diff --git a/webkit/quota/quota_database_unittest.cc b/webkit/quota/quota_database_unittest.cc
index 39abfac..ac6fdcd 100644
--- a/webkit/quota/quota_database_unittest.cc
+++ b/webkit/quota/quota_database_unittest.cc
@@ -489,7 +489,7 @@ class QuotaDatabaseTest : public testing::Test {
db->CommitTransaction();
}
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
};
TEST_F(QuotaDatabaseTest, LazyOpen) {
diff --git a/webkit/quota/quota_manager_unittest.cc b/webkit/quota/quota_manager_unittest.cc
index c60be73..9848770 100644
--- a/webkit/quota/quota_manager_unittest.cc
+++ b/webkit/quota/quota_manager_unittest.cc
@@ -69,7 +69,7 @@ class QuotaManagerTest : public testing::Test {
virtual void TearDown() {
// Make sure the quota manager cleans up correctly.
quota_manager_ = NULL;
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
protected:
@@ -426,7 +426,7 @@ class QuotaManagerTest : public testing::Test {
return base::Time::FromDoubleT(mock_time_counter_ * 10.0);
}
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
base::ScopedTempDir data_dir_;
base::WeakPtrFactory<QuotaManagerTest> weak_factory_;
@@ -474,7 +474,7 @@ TEST_F(QuotaManagerTest, GetUsageInfo) {
QuotaClient::kDatabase));
GetUsageInfo();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(4U, usage_info().size());
for (size_t i = 0; i < usage_info().size(); ++i) {
@@ -503,20 +503,20 @@ TEST_F(QuotaManagerTest, GetUsageAndQuota_Simple) {
QuotaClient::kFileSystem));
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(80, usage());
EXPECT_EQ(0, quota());
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10, usage());
EXPECT_LE(0, quota());
int64 quota_returned_for_foo = quota();
GetUsageAndQuotaForWebApps(GURL("http://bar.com/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(0, usage());
EXPECT_EQ(quota_returned_for_foo, quota());
@@ -524,30 +524,30 @@ TEST_F(QuotaManagerTest, GetUsageAndQuota_Simple) {
TEST_F(QuotaManagerTest, GetUsage_NoClient) {
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(0, usage());
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(0, usage());
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, usage());
GetHostUsage("foo.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, usage());
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, usage());
EXPECT_EQ(0, unlimited_usage());
GetGlobalUsage(kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, usage());
EXPECT_EQ(0, unlimited_usage());
}
@@ -555,30 +555,30 @@ TEST_F(QuotaManagerTest, GetUsage_NoClient) {
TEST_F(QuotaManagerTest, GetUsage_EmptyClient) {
RegisterClient(CreateClient(NULL, 0, QuotaClient::kFileSystem));
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(0, usage());
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(0, usage());
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, usage());
GetHostUsage("foo.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, usage());
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, usage());
EXPECT_EQ(0, unlimited_usage());
GetGlobalUsage(kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, usage());
EXPECT_EQ(0, unlimited_usage());
}
@@ -597,13 +597,13 @@ TEST_F(QuotaManagerTest, GetTemporaryUsageAndQuota_MultiOrigins) {
// This time explicitly sets a temporary global quota.
SetTemporaryGlobalQuota(100);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kTemp, type());
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(100, quota());
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10 + 20, usage());
@@ -614,7 +614,7 @@ TEST_F(QuotaManagerTest, GetTemporaryUsageAndQuota_MultiOrigins) {
EXPECT_EQ(kPerHostQuota, quota());
GetUsageAndQuotaForWebApps(GURL("http://bar.com/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(5 + 7, usage());
EXPECT_EQ(kPerHostQuota, quota());
@@ -645,52 +645,52 @@ TEST_F(QuotaManagerTest, GetUsage_MultipleClients) {
GetAvailableDiskSpaceForTest(base::FilePath()) / kPerHostTemporaryPortion;
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(1 + 128, usage());
GetUsageAndQuotaForWebApps(GURL("http://bar.com/"), kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(4, usage());
GetUsageAndQuotaForWebApps(GURL("http://unlimited/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(512, usage());
EXPECT_EQ(std::min(kAvailableSpaceForApp, kTempQuotaBase) + usage(), quota());
GetUsageAndQuotaForWebApps(GURL("http://unlimited/"), kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(8, usage());
EXPECT_EQ(kAvailableSpaceForApp + usage(), quota());
GetAvailableSpace();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_LE(0, available_space());
GetUsageAndQuotaForWebApps(GURL("http://installed/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(1024, usage());
EXPECT_EQ(std::min(kAvailableSpaceForApp, kTempQuotaBase) + usage(), quota());
GetUsageAndQuotaForWebApps(GURL("http://installed/"), kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(16, usage());
EXPECT_EQ(usage(), quota()); // Over-budget case.
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(1 + 2 + 128 + 512 + 1024, usage());
EXPECT_EQ(512, unlimited_usage());
GetGlobalUsage(kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(4 + 8 + 16 + 256, usage());
EXPECT_EQ(8, unlimited_usage());
@@ -706,7 +706,7 @@ void QuotaManagerTest::GetUsage_WithModifyTestBody(const StorageType type) {
RegisterClient(client);
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), type);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10 + 20, usage());
@@ -715,19 +715,19 @@ void QuotaManagerTest::GetUsage_WithModifyTestBody(const StorageType type) {
client->AddOriginAndNotify(GURL("https://foo.com/"), type, 1);
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), type);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10 + 20 + 30 - 5 + 1, usage());
int foo_usage = usage();
client->AddOriginAndNotify(GURL("http://bar.com/"), type, 40);
GetUsageAndQuotaForWebApps(GURL("http://bar.com/"), type);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(40, usage());
GetGlobalUsage(type);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(foo_usage + 40, usage());
EXPECT_EQ(0, unlimited_usage());
}
@@ -746,14 +746,14 @@ TEST_F(QuotaManagerTest, GetTemporaryUsageAndQuota_WithAdditionalTasks) {
RegisterClient(CreateClient(kData, ARRAYSIZE_UNSAFE(kData),
QuotaClient::kFileSystem));
SetTemporaryGlobalQuota(100);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int kPerHostQuota = 100 / QuotaManager::kPerHostTemporaryPortion;
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp);
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp);
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10 + 20, usage());
EXPECT_EQ(kPerHostQuota, quota());
@@ -763,7 +763,7 @@ TEST_F(QuotaManagerTest, GetTemporaryUsageAndQuota_WithAdditionalTasks) {
kTemp);
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp);
RunAdditionalUsageAndQuotaTask(GURL("http://bar.com/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10 + 20, usage());
EXPECT_EQ(kPerHostQuota, quota());
@@ -780,7 +780,7 @@ TEST_F(QuotaManagerTest, GetTemporaryUsageAndQuota_NukeManager) {
RegisterClient(CreateClient(kData, ARRAYSIZE_UNSAFE(kData),
QuotaClient::kFileSystem));
SetTemporaryGlobalQuota(100);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
set_additional_callback_count(0);
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp);
@@ -794,7 +794,7 @@ TEST_F(QuotaManagerTest, GetTemporaryUsageAndQuota_NukeManager) {
// Nuke before waiting for callbacks.
set_quota_manager(NULL);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaErrorAbort, status());
}
@@ -807,24 +807,24 @@ TEST_F(QuotaManagerTest, GetTemporaryUsageAndQuota_Overbudget) {
RegisterClient(CreateClient(kData, ARRAYSIZE_UNSAFE(kData),
QuotaClient::kFileSystem));
SetTemporaryGlobalQuota(100);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int kPerHostQuota = 100 / QuotaManager::kPerHostTemporaryPortion;
GetUsageAndQuotaForWebApps(GURL("http://usage1/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(1, usage());
EXPECT_EQ(1, quota()); // should be clamped to our current usage
GetUsageAndQuotaForWebApps(GURL("http://usage10/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10, usage());
EXPECT_EQ(10, quota());
GetUsageAndQuotaForWebApps(GURL("http://usage200/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(200, usage());
EXPECT_EQ(kPerHostQuota, quota()); // should be clamped to the nominal quota
@@ -843,10 +843,10 @@ TEST_F(QuotaManagerTest, GetTemporaryUsageAndQuota_Unlimited) {
// Test when not overbugdet.
SetTemporaryGlobalQuota(1000);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(10 + 50 + 4000, usage());
EXPECT_EQ(4000, unlimited_usage());
@@ -854,56 +854,56 @@ TEST_F(QuotaManagerTest, GetTemporaryUsageAndQuota_Unlimited) {
1000 / QuotaManager::kPerHostTemporaryPortion;
GetUsageAndQuotaForWebApps(GURL("http://usage10/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10, usage());
EXPECT_EQ(kPerHostQuotaFor1000, quota());
GetUsageAndQuotaForWebApps(GURL("http://usage50/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(50, usage());
EXPECT_EQ(kPerHostQuotaFor1000, quota());
GetUsageAndQuotaForWebApps(GURL("http://unlimited/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(4000, usage());
EXPECT_EQ(kAvailableSpaceForApp + usage(), quota());
GetUsageAndQuotaForStorageClient(GURL("http://unlimited/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(0, usage());
EXPECT_EQ(QuotaManager::kNoLimit, quota());
// Test when overbugdet.
SetTemporaryGlobalQuota(100);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int kPerHostQuotaFor100 =
100 / QuotaManager::kPerHostTemporaryPortion;
GetUsageAndQuotaForWebApps(GURL("http://usage10/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10, usage());
EXPECT_EQ(kPerHostQuotaFor100, quota());
GetUsageAndQuotaForWebApps(GURL("http://usage50/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(50, usage());
EXPECT_EQ(kPerHostQuotaFor100, quota());
GetUsageAndQuotaForWebApps(GURL("http://unlimited/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(4000, usage());
EXPECT_EQ(kAvailableSpaceForApp + usage(), quota());
GetUsageAndQuotaForStorageClient(GURL("http://unlimited/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(0, usage());
EXPECT_EQ(QuotaManager::kNoLimit, quota());
@@ -913,30 +913,30 @@ TEST_F(QuotaManagerTest, GetTemporaryUsageAndQuota_Unlimited) {
mock_special_storage_policy()->NotifyCleared();
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(10 + 50 + 4000, usage());
EXPECT_EQ(0, unlimited_usage());
GetUsageAndQuotaForWebApps(GURL("http://usage10/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10, usage());
EXPECT_EQ(10, quota()); // should be clamped to our current usage
GetUsageAndQuotaForWebApps(GURL("http://usage50/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(50, usage());
EXPECT_EQ(kPerHostQuotaFor100, quota());
GetUsageAndQuotaForWebApps(GURL("http://unlimited/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(4000, usage());
EXPECT_EQ(kPerHostQuotaFor100, quota());
GetUsageAndQuotaForStorageClient(GURL("http://unlimited/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(4000, usage());
EXPECT_EQ(kPerHostQuotaFor100, quota());
@@ -968,11 +968,11 @@ TEST_F(QuotaManagerTest, GetAndSetPerststentHostQuota) {
RegisterClient(CreateClient(NULL, 0, QuotaClient::kFileSystem));
GetPersistentHostQuota("foo.com");
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, quota());
SetPersistentHostQuota("foo.com", 100);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(100, quota());
GetPersistentHostQuota("foo.com");
@@ -980,7 +980,7 @@ TEST_F(QuotaManagerTest, GetAndSetPerststentHostQuota) {
GetPersistentHostQuota("foo.com");
SetPersistentHostQuota("foo.com", 300000000000ll);
GetPersistentHostQuota("foo.com");
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(300000000000ll, quota());
}
@@ -988,14 +988,14 @@ TEST_F(QuotaManagerTest, GetAndSetPersistentUsageAndQuota) {
RegisterClient(CreateClient(NULL, 0, QuotaClient::kFileSystem));
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(0, usage());
EXPECT_EQ(0, quota());
SetPersistentHostQuota("foo.com", 100);
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(0, usage());
EXPECT_EQ(100, quota());
@@ -1004,19 +1004,19 @@ TEST_F(QuotaManagerTest, GetAndSetPersistentUsageAndQuota) {
mock_special_storage_policy()->GrantQueryDiskSize(GURL("http://installed/"));
SetPersistentHostQuota("installed", kAvailableSpaceForApp + 100);
GetUsageAndQuotaForWebApps(GURL("http://installed/"), kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kAvailableSpaceForApp, quota());
// Ditto for unlimited apps.
mock_special_storage_policy()->AddUnlimited(GURL("http://unlimited/"));
GetUsageAndQuotaForWebApps(GURL("http://unlimited/"), kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kAvailableSpaceForApp, quota());
// GetUsageAndQuotaForStorageClient should just return 0 usage and
// kNoLimit quota.
GetUsageAndQuotaForStorageClient(GURL("http://unlimited/"), kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, usage());
EXPECT_EQ(QuotaManager::kNoLimit, quota());
}
@@ -1033,7 +1033,7 @@ TEST_F(QuotaManagerTest, GetSyncableQuota) {
// kAvailableSpaceForApp as syncable quota (because of the pre-condition).
mock_special_storage_policy()->GrantQueryDiskSize(GURL("http://installed/"));
GetUsageAndQuotaForWebApps(GURL("http://installed/"), kSync);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(0, usage());
EXPECT_EQ(kAvailableSpaceForApp, quota());
@@ -1041,7 +1041,7 @@ TEST_F(QuotaManagerTest, GetSyncableQuota) {
// If it's not installed (which shouldn't happen in real case) it
// should just return the default host quota for syncable.
GetUsageAndQuotaForWebApps(GURL("http://foo/"), kSync);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(0, usage());
EXPECT_EQ(QuotaManager::kSyncableStorageDefaultHostQuota, quota());
@@ -1063,7 +1063,7 @@ TEST_F(QuotaManagerTest, GetPersistentUsageAndQuota_MultiOrigins) {
SetPersistentHostQuota("foo.com", 100);
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10 + 20 + 13 + 19, usage());
EXPECT_EQ(100, quota());
@@ -1087,7 +1087,7 @@ TEST_F(QuotaManagerTest, GetPersistentUsageAndQuota_WithAdditionalTasks) {
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kPerm);
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kPerm);
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10 + 20, usage());
EXPECT_EQ(100, quota());
@@ -1097,7 +1097,7 @@ TEST_F(QuotaManagerTest, GetPersistentUsageAndQuota_WithAdditionalTasks) {
kPerm);
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kPerm);
RunAdditionalUsageAndQuotaTask(GURL("http://bar.com/"), kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10 + 20, usage());
EXPECT_EQ(2, additional_callback_count());
@@ -1121,7 +1121,7 @@ TEST_F(QuotaManagerTest, GetPersistentUsageAndQuota_NukeManager) {
// Nuke before waiting for callbacks.
set_quota_manager(NULL);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaErrorAbort, status());
}
@@ -1139,21 +1139,21 @@ TEST_F(QuotaManagerTest, GetUsage_Simple) {
QuotaClient::kFileSystem));
GetGlobalUsage(kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(usage(), 1 + 20 + 600000);
EXPECT_EQ(0, unlimited_usage());
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(usage(), 300 + 4000 + 50000 + 7000000);
EXPECT_EQ(0, unlimited_usage());
GetHostUsage("foo.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(usage(), 1 + 20);
GetHostUsage("buz.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(usage(), 4000 + 50000);
}
@@ -1173,7 +1173,7 @@ TEST_F(QuotaManagerTest, GetUsage_WithModification) {
RegisterClient(client);
GetGlobalUsage(kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(usage(), 1 + 20 + 600000);
EXPECT_EQ(0, unlimited_usage());
@@ -1181,12 +1181,12 @@ TEST_F(QuotaManagerTest, GetUsage_WithModification) {
GURL("http://foo.com/"), kPerm, 80000000);
GetGlobalUsage(kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(usage(), 1 + 20 + 600000 + 80000000);
EXPECT_EQ(0, unlimited_usage());
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(usage(), 300 + 4000 + 50000 + 7000000);
EXPECT_EQ(0, unlimited_usage());
@@ -1194,19 +1194,19 @@ TEST_F(QuotaManagerTest, GetUsage_WithModification) {
GURL("http://foo.com/"), kTemp, 1);
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(usage(), 300 + 4000 + 50000 + 7000000 + 1);
EXPECT_EQ(0, unlimited_usage());
GetHostUsage("buz.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(usage(), 4000 + 50000);
client->ModifyOriginAndNotify(
GURL("http://buz.com/"), kTemp, 900000000);
GetHostUsage("buz.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(usage(), 4000 + 50000 + 900000000);
}
@@ -1222,38 +1222,38 @@ TEST_F(QuotaManagerTest, GetUsage_WithDeleteOrigin) {
RegisterClient(client);
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
int64 predelete_global_tmp = usage();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
int64 predelete_host_tmp = usage();
GetHostUsage("foo.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
int64 predelete_host_pers = usage();
DeleteClientOriginData(client, GURL("http://foo.com/"),
kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_global_tmp - 1, usage());
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_host_tmp - 1, usage());
GetHostUsage("foo.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_host_pers, usage());
}
TEST_F(QuotaManagerTest, GetAvailableSpaceTest) {
GetAvailableSpace();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_LE(0, available_space());
}
@@ -1280,15 +1280,15 @@ TEST_F(QuotaManagerTest, EvictOriginData) {
RegisterClient(client2);
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
int64 predelete_global_tmp = usage();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
int64 predelete_host_tmp = usage();
GetHostUsage("foo.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
int64 predelete_host_pers = usage();
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kData1); ++i)
@@ -1297,13 +1297,13 @@ TEST_F(QuotaManagerTest, EvictOriginData) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kData2); ++i)
quota_manager()->NotifyStorageAccessed(QuotaClient::kUnknown,
GURL(kData2[i].origin), kData2[i].type);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EvictOriginData(GURL("http://foo.com/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
DumpOriginInfoTable();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
typedef OriginInfoTableEntries::const_iterator iterator;
for (iterator itr(origin_info_entries().begin()),
@@ -1314,15 +1314,15 @@ TEST_F(QuotaManagerTest, EvictOriginData) {
}
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_global_tmp - (1 + 50000), usage());
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_host_tmp - (1 + 50000), usage());
GetHostUsage("foo.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_host_pers, usage());
}
@@ -1339,20 +1339,20 @@ TEST_F(QuotaManagerTest, EvictOriginDataWithDeletionError) {
RegisterClient(client);
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
int64 predelete_global_tmp = usage();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
int64 predelete_host_tmp = usage();
GetHostUsage("foo.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
int64 predelete_host_pers = usage();
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kData); ++i)
NotifyStorageAccessed(client, GURL(kData[i].origin), kData[i].type);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
client->AddOriginToErrorSet(GURL("http://foo.com/"), kTemp);
@@ -1360,12 +1360,12 @@ TEST_F(QuotaManagerTest, EvictOriginDataWithDeletionError) {
i < QuotaManager::kThresholdOfErrorsToBeBlacklisted + 1;
++i) {
EvictOriginData(GURL("http://foo.com/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaErrorInvalidModification, status());
}
DumpOriginInfoTable();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
bool found_origin_in_database = false;
typedef OriginInfoTableEntries::const_iterator iterator;
@@ -1383,31 +1383,31 @@ TEST_F(QuotaManagerTest, EvictOriginDataWithDeletionError) {
for (size_t i = 0; i < kNumberOfTemporaryOrigins - 1; ++i) {
GetLRUOrigin(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(lru_origin().is_empty());
// The origin "http://foo.com/" should not be in the LRU list.
EXPECT_NE(std::string("http://foo.com/"), lru_origin().spec());
DeleteOriginFromDatabase(lru_origin(), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
// Now the LRU list must be empty.
GetLRUOrigin(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(lru_origin().is_empty());
// Deleting origins from the database should not affect the results of the
// following checks.
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_global_tmp, usage());
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_host_tmp, usage());
GetHostUsage("foo.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_host_pers, usage());
}
@@ -1425,10 +1425,10 @@ TEST_F(QuotaManagerTest, GetUsageAndQuotaForEviction) {
RegisterClient(client);
SetTemporaryGlobalQuota(10000000);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetUsageAndQuotaForEviction();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(4021, usage());
EXPECT_EQ(4000, unlimited_usage());
@@ -1445,47 +1445,47 @@ TEST_F(QuotaManagerTest, DeleteHostDataSimple) {
RegisterClient(client);
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 predelete_global_tmp = usage();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
int64 predelete_host_tmp = usage();
GetHostUsage("foo.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
int64 predelete_host_pers = usage();
DeleteHostData(std::string(), kTemp, kAllClients);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_global_tmp, usage());
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_host_tmp, usage());
GetHostUsage("foo.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_host_pers, usage());
DeleteHostData("foo.com", kTemp, kAllClients);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_global_tmp - 1, usage());
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_host_tmp - 1, usage());
GetHostUsage("foo.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_host_pers, usage());
}
@@ -1511,35 +1511,35 @@ TEST_F(QuotaManagerTest, DeleteHostDataMultiple) {
RegisterClient(client2);
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 predelete_global_tmp = usage();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 predelete_foo_tmp = usage();
GetHostUsage("bar.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 predelete_bar_tmp = usage();
GetHostUsage("foo.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 predelete_foo_pers = usage();
GetHostUsage("bar.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 predelete_bar_pers = usage();
reset_status_callback_count();
DeleteHostData("foo.com", kTemp, kAllClients);
DeleteHostData("bar.com", kTemp, kAllClients);
DeleteHostData("foo.com", kTemp, kAllClients);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(3, status_callback_count());
DumpOriginInfoTable();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
typedef OriginInfoTableEntries::const_iterator iterator;
for (iterator itr(origin_info_entries().begin()),
@@ -1554,24 +1554,24 @@ TEST_F(QuotaManagerTest, DeleteHostDataMultiple) {
}
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
- EXPECT_EQ(
- predelete_global_tmp - (1 + 20 + 4000 + 50000 + 6000 + 80 + 9), usage());
+ base::MessageLoop::current()->RunUntilIdle();
+ EXPECT_EQ(predelete_global_tmp - (1 + 20 + 4000 + 50000 + 6000 + 80 + 9),
+ usage());
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_foo_tmp - (1 + 20 + 50000 + 6000 + 80), usage());
GetHostUsage("bar.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_bar_tmp - (4000 + 9), usage());
GetHostUsage("foo.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_foo_pers, usage());
GetHostUsage("bar.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_bar_pers, usage());
}
@@ -1599,23 +1599,23 @@ TEST_F(QuotaManagerTest, DeleteOriginDataMultiple) {
RegisterClient(client2);
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 predelete_global_tmp = usage();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 predelete_foo_tmp = usage();
GetHostUsage("bar.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 predelete_bar_tmp = usage();
GetHostUsage("foo.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 predelete_foo_pers = usage();
GetHostUsage("bar.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 predelete_bar_pers = usage();
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kData1); ++i)
@@ -1624,18 +1624,18 @@ TEST_F(QuotaManagerTest, DeleteOriginDataMultiple) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kData2); ++i)
quota_manager()->NotifyStorageAccessed(QuotaClient::kUnknown,
GURL(kData2[i].origin), kData2[i].type);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
reset_status_callback_count();
DeleteOriginData(GURL("http://foo.com/"), kTemp, kAllClients);
DeleteOriginData(GURL("http://bar.com/"), kTemp, kAllClients);
DeleteOriginData(GURL("http://foo.com/"), kTemp, kAllClients);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(3, status_callback_count());
DumpOriginInfoTable();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
typedef OriginInfoTableEntries::const_iterator iterator;
for (iterator itr(origin_info_entries().begin()),
@@ -1648,23 +1648,23 @@ TEST_F(QuotaManagerTest, DeleteOriginDataMultiple) {
}
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_global_tmp - (1 + 4000 + 50000 + 9), usage());
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_foo_tmp - (1 + 50000), usage());
GetHostUsage("bar.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_bar_tmp - (4000 + 9), usage());
GetHostUsage("foo.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_foo_pers, usage());
GetHostUsage("bar.com", kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_bar_pers, usage());
}
@@ -1688,12 +1688,12 @@ TEST_F(QuotaManagerTest, GetCachedOrigins) {
// No matter how we make queries the quota manager tries to cache all
// the origins at startup.
GetHostUsage("a.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetCachedOrigins(kTemp, &origins);
EXPECT_EQ(3U, origins.size());
GetHostUsage("b.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetCachedOrigins(kTemp, &origins);
EXPECT_EQ(3U, origins.size());
@@ -1701,7 +1701,7 @@ TEST_F(QuotaManagerTest, GetCachedOrigins) {
EXPECT_TRUE(origins.empty());
GetGlobalUsage(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetCachedOrigins(kTemp, &origins);
EXPECT_EQ(3U, origins.size());
@@ -1725,29 +1725,29 @@ TEST_F(QuotaManagerTest, NotifyAndLRUOrigin) {
GURL origin;
GetLRUOrigin(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(lru_origin().is_empty());
NotifyStorageAccessed(client, GURL("http://a.com/"), kTemp);
GetLRUOrigin(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ("http://a.com/", lru_origin().spec());
NotifyStorageAccessed(client, GURL("http://b.com/"), kPerm);
NotifyStorageAccessed(client, GURL("https://a.com/"), kTemp);
NotifyStorageAccessed(client, GURL("http://c.com/"), kTemp);
GetLRUOrigin(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ("http://a.com/", lru_origin().spec());
DeleteOriginFromDatabase(lru_origin(), kTemp);
GetLRUOrigin(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ("https://a.com/", lru_origin().spec());
DeleteOriginFromDatabase(lru_origin(), kTemp);
GetLRUOrigin(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ("http://c.com/", lru_origin().spec());
}
@@ -1765,7 +1765,7 @@ TEST_F(QuotaManagerTest, GetLRUOriginWithOriginInUse) {
GURL origin;
GetLRUOrigin(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(lru_origin().is_empty());
NotifyStorageAccessed(client, GURL("http://a.com/"), kTemp);
@@ -1774,19 +1774,19 @@ TEST_F(QuotaManagerTest, GetLRUOriginWithOriginInUse) {
NotifyStorageAccessed(client, GURL("http://c.com/"), kTemp);
GetLRUOrigin(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ("http://a.com/", lru_origin().spec());
// Notify origin http://a.com is in use.
NotifyOriginInUse(GURL("http://a.com/"));
GetLRUOrigin(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ("https://a.com/", lru_origin().spec());
// Notify origin https://a.com is in use while GetLRUOrigin is running.
GetLRUOrigin(kTemp);
NotifyOriginInUse(GURL("https://a.com/"));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// Post-filtering must have excluded the returned origin, so we will
// see empty result here.
EXPECT_TRUE(lru_origin().is_empty());
@@ -1794,7 +1794,7 @@ TEST_F(QuotaManagerTest, GetLRUOriginWithOriginInUse) {
// Notify access for http://c.com while GetLRUOrigin is running.
GetLRUOrigin(kTemp);
NotifyStorageAccessed(client, GURL("http://c.com/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// Post-filtering must have excluded the returned origin, so we will
// see empty result here.
EXPECT_TRUE(lru_origin().is_empty());
@@ -1802,7 +1802,7 @@ TEST_F(QuotaManagerTest, GetLRUOriginWithOriginInUse) {
NotifyOriginNoLongerInUse(GURL("http://a.com/"));
NotifyOriginNoLongerInUse(GURL("https://a.com/"));
GetLRUOrigin(kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ("http://a.com/", lru_origin().spec());
}
@@ -1819,7 +1819,7 @@ TEST_F(QuotaManagerTest, GetOriginsModifiedSince) {
RegisterClient(client);
GetOriginsModifiedSince(kTemp, base::Time());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(modified_origins().empty());
EXPECT_EQ(modified_origins_type(), kTemp);
@@ -1833,7 +1833,7 @@ TEST_F(QuotaManagerTest, GetOriginsModifiedSince) {
base::Time time3 = client->IncrementMockTime();
GetOriginsModifiedSince(kTemp, time1);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(4U, modified_origins().size());
EXPECT_EQ(modified_origins_type(), kTemp);
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kData); ++i) {
@@ -1842,18 +1842,18 @@ TEST_F(QuotaManagerTest, GetOriginsModifiedSince) {
}
GetOriginsModifiedSince(kTemp, time2);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(2U, modified_origins().size());
GetOriginsModifiedSince(kTemp, time3);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(modified_origins().empty());
EXPECT_EQ(modified_origins_type(), kTemp);
client->ModifyOriginAndNotify(GURL("http://a.com/"), kTemp, 10);
GetOriginsModifiedSince(kTemp, time3);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1U, modified_origins().size());
EXPECT_EQ(1U, modified_origins().count(GURL("http://a.com/")));
EXPECT_EQ(modified_origins_type(), kTemp);
@@ -1863,10 +1863,10 @@ TEST_F(QuotaManagerTest, DumpQuotaTable) {
SetPersistentHostQuota("example1.com", 1);
SetPersistentHostQuota("example2.com", 20);
SetPersistentHostQuota("example3.com", 300);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
DumpQuotaTable();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const QuotaTableEntry kEntries[] = {
QuotaTableEntry("example1.com", kPerm, 1),
@@ -1902,10 +1902,10 @@ TEST_F(QuotaManagerTest, DumpOriginInfoTable) {
QuotaClient::kUnknown,
GURL("http://example.com/"),
kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
DumpOriginInfoTable();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
typedef std::pair<GURL, StorageType> TypedOrigin;
typedef std::pair<TypedOrigin, int> Entry;
@@ -1933,12 +1933,12 @@ TEST_F(QuotaManagerTest, DumpOriginInfoTable) {
TEST_F(QuotaManagerTest, QuotaForEmptyHost) {
GetPersistentHostQuota(std::string());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(0, quota());
SetPersistentHostQuota(std::string(), 10);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaErrorNotSupported, status());
}
@@ -1969,32 +1969,32 @@ TEST_F(QuotaManagerTest, DeleteSpecificClientTypeSingleOrigin) {
RegisterClient(client4);
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 predelete_foo_tmp = usage();
DeleteOriginData(GURL("http://foo.com/"), kTemp, QuotaClient::kFileSystem);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_foo_tmp - 1, usage());
DeleteOriginData(GURL("http://foo.com/"), kTemp, QuotaClient::kAppcache);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_foo_tmp - 2 - 1, usage());
DeleteOriginData(GURL("http://foo.com/"), kTemp, QuotaClient::kDatabase);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_foo_tmp - 4 - 2 - 1, usage());
DeleteOriginData(GURL("http://foo.com/"), kTemp,
QuotaClient::kIndexedDatabase);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_foo_tmp - 8 - 4 - 2 - 1, usage());
}
@@ -2025,31 +2025,31 @@ TEST_F(QuotaManagerTest, DeleteSpecificClientTypeSingleHost) {
RegisterClient(client4);
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 predelete_foo_tmp = usage();
DeleteHostData("foo.com", kTemp, QuotaClient::kFileSystem);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_foo_tmp - 1, usage());
DeleteHostData("foo.com", kTemp, QuotaClient::kAppcache);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_foo_tmp - 2 - 1, usage());
DeleteHostData("foo.com", kTemp, QuotaClient::kDatabase);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_foo_tmp - 4 - 2 - 1, usage());
DeleteHostData("foo.com", kTemp, QuotaClient::kIndexedDatabase);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_foo_tmp - 8 - 4 - 2 - 1, usage());
}
@@ -2080,21 +2080,21 @@ TEST_F(QuotaManagerTest, DeleteMultipleClientTypesSingleOrigin) {
RegisterClient(client4);
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 predelete_foo_tmp = usage();
DeleteOriginData(GURL("http://foo.com/"), kTemp,
QuotaClient::kFileSystem | QuotaClient::kDatabase);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_foo_tmp - 4 - 1, usage());
DeleteOriginData(GURL("http://foo.com/"), kTemp,
QuotaClient::kAppcache | QuotaClient::kIndexedDatabase);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_foo_tmp - 8 - 4 - 2 - 1, usage());
}
@@ -2125,21 +2125,21 @@ TEST_F(QuotaManagerTest, DeleteMultipleClientTypesSingleHost) {
RegisterClient(client4);
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
const int64 predelete_foo_tmp = usage();
DeleteHostData("foo.com", kTemp,
QuotaClient::kFileSystem | QuotaClient::kAppcache);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_foo_tmp - 2 - 1, usage());
DeleteHostData("foo.com", kTemp,
QuotaClient::kDatabase | QuotaClient::kIndexedDatabase);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
GetHostUsage("foo.com", kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(predelete_foo_tmp - 8 - 4 - 2 - 1, usage());
}
@@ -2154,14 +2154,14 @@ TEST_F(QuotaManagerTest, GetUsageAndQuota_Incognito) {
QuotaClient::kFileSystem));
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(80, usage());
EXPECT_EQ(0, quota());
SetTemporaryGlobalQuota(100);
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10, usage());
EXPECT_LE(std::min(static_cast<int64>(100 / kPerHostTemporaryPortion),
@@ -2169,13 +2169,13 @@ TEST_F(QuotaManagerTest, GetUsageAndQuota_Incognito) {
mock_special_storage_policy()->AddUnlimited(GURL("http://foo.com/"));
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kPerm);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(80, usage());
EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota());
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10, usage());
EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota());
diff --git a/webkit/quota/quota_task.cc b/webkit/quota/quota_task.cc
index 3d591ff..347cc54 100644
--- a/webkit/quota/quota_task.cc
+++ b/webkit/quota/quota_task.cc
@@ -53,7 +53,7 @@ void QuotaTask::DeleteSoon() {
if (delete_scheduled_)
return;
delete_scheduled_ = true;
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
// QuotaTaskObserver -------------------------------------------------------
diff --git a/webkit/quota/quota_temporary_storage_evictor_unittest.cc b/webkit/quota/quota_temporary_storage_evictor_unittest.cc
index bc3a409..2a63257 100644
--- a/webkit/quota/quota_temporary_storage_evictor_unittest.cc
+++ b/webkit/quota/quota_temporary_storage_evictor_unittest.cc
@@ -156,7 +156,7 @@ class QuotaTemporaryStorageEvictorTest : public testing::Test {
virtual void TearDown() {
temporary_storage_evictor_.reset();
quota_eviction_handler_.reset();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
void TaskForRepeatedEvictionTest(
@@ -220,7 +220,7 @@ class QuotaTemporaryStorageEvictorTest : public testing::Test {
reset_min_available_disk_space_to_start_eviction();
}
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
scoped_ptr<MockQuotaEvictionHandler> quota_eviction_handler_;
scoped_ptr<QuotaTemporaryStorageEvictor> temporary_storage_evictor_;
@@ -240,7 +240,7 @@ TEST_F(QuotaTemporaryStorageEvictorTest, SimpleEvictionTest) {
EXPECT_EQ(3000 + 200 + 500, quota_eviction_handler()->GetUsage());
set_repeated_eviction(false);
temporary_storage_evictor()->Start();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(200 + 500, quota_eviction_handler()->GetUsage());
EXPECT_EQ(0, statistics().num_errors_on_evicting_origin);
@@ -260,7 +260,7 @@ TEST_F(QuotaTemporaryStorageEvictorTest, MultipleEvictionTest) {
EXPECT_EQ(20 + 2900 + 450 + 400, quota_eviction_handler()->GetUsage());
set_repeated_eviction(false);
temporary_storage_evictor()->Start();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(450 + 400, quota_eviction_handler()->GetUsage());
EXPECT_EQ(0, statistics().num_errors_on_evicting_origin);
@@ -292,7 +292,7 @@ TEST_F(QuotaTemporaryStorageEvictorTest, RepeatedEvictionTest) {
initial_total_size - d_size + e_size - c_size));
EXPECT_EQ(initial_total_size, quota_eviction_handler()->GetUsage());
temporary_storage_evictor()->Start();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(initial_total_size - d_size + e_size - c_size - b_size,
quota_eviction_handler()->GetUsage());
EXPECT_EQ(5, num_get_usage_and_quota_for_eviction());
@@ -324,9 +324,8 @@ TEST_F(QuotaTemporaryStorageEvictorTest, RepeatedEvictionSkippedTest) {
EXPECT_EQ(initial_total_size, quota_eviction_handler()->GetUsage());
set_repeated_eviction(true);
temporary_storage_evictor()->Start();
- MessageLoop::current()->RunUntilIdle();
- EXPECT_EQ(initial_total_size - d_size,
- quota_eviction_handler()->GetUsage());
+ base::MessageLoop::current()->RunUntilIdle();
+ EXPECT_EQ(initial_total_size - d_size, quota_eviction_handler()->GetUsage());
EXPECT_EQ(4, num_get_usage_and_quota_for_eviction());
EXPECT_EQ(0, statistics().num_errors_on_evicting_origin);
@@ -359,7 +358,7 @@ TEST_F(QuotaTemporaryStorageEvictorTest, RepeatedEvictionWithAccessOriginTest) {
initial_total_size - d_size + e_size - b_size));
EXPECT_EQ(initial_total_size, quota_eviction_handler()->GetUsage());
temporary_storage_evictor()->Start();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(initial_total_size - d_size + e_size - b_size - a_size,
quota_eviction_handler()->GetUsage());
EXPECT_EQ(5, num_get_usage_and_quota_for_eviction());
@@ -381,7 +380,7 @@ TEST_F(QuotaTemporaryStorageEvictorTest, DiskSpaceNonEvictionTest) {
reset_min_available_disk_space_to_start_eviction();
set_repeated_eviction(false);
temporary_storage_evictor()->Start();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(414 + 450, quota_eviction_handler()->GetUsage());
EXPECT_EQ(0, statistics().num_errors_on_evicting_origin);
@@ -404,7 +403,7 @@ TEST_F(QuotaTemporaryStorageEvictorTest, DiskSpaceEvictionTest) {
default_min_available_disk_space_to_start_eviction());
set_repeated_eviction(false);
temporary_storage_evictor()->Start();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(150 + 300, quota_eviction_handler()->GetUsage());
EXPECT_EQ(0, statistics().num_errors_on_evicting_origin);
@@ -424,7 +423,7 @@ TEST_F(QuotaTemporaryStorageEvictorTest, UnlimitedExclusionEvictionTest) {
EXPECT_EQ(3000 + 200 + 500000, quota_eviction_handler()->GetUsage());
set_repeated_eviction(false);
temporary_storage_evictor()->Start();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// Nothing should have been evicted.
EXPECT_EQ(3000 + 200 + 500000, quota_eviction_handler()->GetUsage());
}
diff --git a/webkit/quota/usage_tracker_unittest.cc b/webkit/quota/usage_tracker_unittest.cc
index b0e8302..3a236bc 100644
--- a/webkit/quota/usage_tracker_unittest.cc
+++ b/webkit/quota/usage_tracker_unittest.cc
@@ -53,7 +53,8 @@ class MockQuotaClient : public QuotaClient {
const GetUsageCallback& callback) OVERRIDE {
EXPECT_EQ(kStorageTypeTemporary, type);
int64 usage = GetUsage(origin);
- MessageLoop::current()->PostTask(FROM_HERE, base::Bind(callback, usage));
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::Bind(callback, usage));
}
virtual void GetOriginsForType(StorageType type,
@@ -64,8 +65,8 @@ class MockQuotaClient : public QuotaClient {
itr != usage_map_.end(); ++itr) {
origins.insert(itr->first);
}
- MessageLoop::current()->PostTask(
- FROM_HERE, base::Bind(callback, origins, type));
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::Bind(callback, origins, type));
}
virtual void GetOriginsForHost(StorageType type,
@@ -78,8 +79,8 @@ class MockQuotaClient : public QuotaClient {
if (net::GetHostOrSpecFromURL(itr->first) == host)
origins.insert(itr->first);
}
- MessageLoop::current()->PostTask(
- FROM_HERE, base::Bind(callback, origins, type));
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::Bind(callback, origins, type));
}
virtual void DeleteOriginData(const GURL& origin,
@@ -87,7 +88,7 @@ class MockQuotaClient : public QuotaClient {
const DeletionCallback& callback) OVERRIDE {
EXPECT_EQ(kStorageTypeTemporary, type);
usage_map_.erase(origin);
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(callback, kQuotaStatusOk));
}
@@ -186,7 +187,7 @@ class UsageTrackerTest : public testing::Test {
return client_list;
}
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
scoped_refptr<MockSpecialStoragePolicy> storage_policy_;
MockQuotaClient quota_client_;
diff --git a/webkit/support/test_webmessageportchannel.cc b/webkit/support/test_webmessageportchannel.cc
index cac8975b..bc06161 100644
--- a/webkit/support/test_webmessageportchannel.cc
+++ b/webkit/support/test_webmessageportchannel.cc
@@ -61,9 +61,10 @@ void TestWebMessagePortChannel::postMessage(const WebString& data,
WebMessagePortChannelArray* ports) {
if (remote_ == NULL)
return;
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
- base::Bind(&TestWebMessagePortChannel::queueMessage, remote_.get(),
+ base::Bind(&TestWebMessagePortChannel::queueMessage,
+ remote_.get(),
new Message(data, ports)));
}
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc
index 03fb552..41dff2f 100644
--- a/webkit/support/webkit_support.cc
+++ b/webkit/support/webkit_support.cc
@@ -152,9 +152,9 @@ class TestEnvironment {
public:
#if defined(OS_ANDROID)
// Android UI message loop goes through Java, so don't use it in tests.
- typedef MessageLoop MessageLoopType;
+ typedef base::MessageLoop MessageLoopType;
#else
- typedef MessageLoopForUI MessageLoopType;
+ typedef base::MessageLoopForUI MessageLoopType;
#endif
TestEnvironment(bool unit_test_mode,
@@ -265,19 +265,17 @@ base::FilePath GetWebKitRootDirFilePath() {
class WebKitClientMessageLoopImpl
: public WebDevToolsAgentClient::WebKitClientMessageLoop {
public:
- WebKitClientMessageLoopImpl() : message_loop_(MessageLoop::current()) {}
- virtual ~WebKitClientMessageLoopImpl() {
- message_loop_ = NULL;
- }
+ WebKitClientMessageLoopImpl() : message_loop_(base::MessageLoop::current()) {}
+ virtual ~WebKitClientMessageLoopImpl() { message_loop_ = NULL; }
virtual void run() {
- MessageLoop::ScopedNestableTaskAllower allow(message_loop_);
+ base::MessageLoop::ScopedNestableTaskAllower allow(message_loop_);
message_loop_->Run();
}
virtual void quitNow() {
message_loop_->QuitNow();
}
private:
- MessageLoop* message_loop_;
+ base::MessageLoop* message_loop_;
};
TestEnvironment* test_environment;
@@ -522,15 +520,15 @@ bool BeingDebugged() {
// Wrappers for MessageLoop
void RunMessageLoop() {
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
void QuitMessageLoop() {
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
void QuitMessageLoopNow() {
- MessageLoop::current()->QuitNow();
+ base::MessageLoop::current()->QuitNow();
}
void RunAllPendingMessages() {
@@ -538,16 +536,16 @@ void RunAllPendingMessages() {
}
bool MessageLoopNestableTasksAllowed() {
- return MessageLoop::current()->NestableTasksAllowed();
+ return base::MessageLoop::current()->NestableTasksAllowed();
}
void MessageLoopSetNestableTasksAllowed(bool allowed) {
- MessageLoop::current()->SetNestableTasksAllowed(allowed);
+ base::MessageLoop::current()->SetNestableTasksAllowed(allowed);
}
void DispatchMessageLoop() {
- MessageLoop* current = MessageLoop::current();
- MessageLoop::ScopedNestableTaskAllower allow(current);
+ base::MessageLoop* current = base::MessageLoop::current();
+ base::MessageLoop::ScopedNestableTaskAllower allow(current);
base::RunLoop().RunUntilIdle();
}
@@ -556,14 +554,14 @@ WebDevToolsAgentClient::WebKitClientMessageLoop* CreateDevToolsMessageLoop() {
}
void PostDelayedTask(void (*func)(void*), void* context, int64 delay_ms) {
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(func, context),
base::TimeDelta::FromMilliseconds(delay_ms));
}
void PostDelayedTask(TaskAdaptor* task, int64 delay_ms) {
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&TaskAdaptor::Run, base::Owned(task)),
base::TimeDelta::FromMilliseconds(delay_ms));
diff --git a/webkit/tools/test_shell/notification_presenter.cc b/webkit/tools/test_shell/notification_presenter.cc
index c42e7d2..f106922 100644
--- a/webkit/tools/test_shell/notification_presenter.cc
+++ b/webkit/tools/test_shell/notification_presenter.cc
@@ -71,7 +71,7 @@ bool TestNotificationPresenter::show(const WebNotification& notification) {
WebNotification event_target(notification);
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&DeferredDisplayDispatch, event_target));
return true;
}
diff --git a/webkit/tools/test_shell/simple_appcache_system.cc b/webkit/tools/test_shell/simple_appcache_system.cc
index 39f71e3..7c6e0ed 100644
--- a/webkit/tools/test_shell/simple_appcache_system.cc
+++ b/webkit/tools/test_shell/simple_appcache_system.cc
@@ -391,7 +391,7 @@ SimpleAppCacheSystem::~SimpleAppCacheSystem() {
void SimpleAppCacheSystem::InitOnUIThread(
const base::FilePath& cache_directory) {
DCHECK(!ui_message_loop_);
- ui_message_loop_ = MessageLoop::current();
+ ui_message_loop_ = base::MessageLoop::current();
cache_directory_ = cache_directory;
}
@@ -401,7 +401,7 @@ void SimpleAppCacheSystem::InitOnIOThread(
return;
DCHECK(!io_message_loop_);
- io_message_loop_ = MessageLoop::current();
+ io_message_loop_ = base::MessageLoop::current();
if (!db_thread_.IsRunning())
db_thread_.Start();
diff --git a/webkit/tools/test_shell/simple_appcache_system.h b/webkit/tools/test_shell/simple_appcache_system.h
index 4a4cbce..e6639ad 100644
--- a/webkit/tools/test_shell/simple_appcache_system.h
+++ b/webkit/tools/test_shell/simple_appcache_system.h
@@ -98,10 +98,14 @@ class SimpleAppCacheSystem {
GURL* manifest_url);
// Helpers
- MessageLoop* io_message_loop() { return io_message_loop_; }
- MessageLoop* ui_message_loop() { return ui_message_loop_; }
- bool is_io_thread() { return MessageLoop::current() == io_message_loop_; }
- bool is_ui_thread() { return MessageLoop::current() == ui_message_loop_; }
+ base::MessageLoop* io_message_loop() { return io_message_loop_; }
+ base::MessageLoop* ui_message_loop() { return ui_message_loop_; }
+ bool is_io_thread() {
+ return base::MessageLoop::current() == io_message_loop_;
+ }
+ bool is_ui_thread() {
+ return base::MessageLoop::current() == ui_message_loop_;
+ }
bool is_initialized() {
return io_message_loop_ && is_initailized_on_ui_thread();
}
@@ -110,8 +114,8 @@ class SimpleAppCacheSystem {
}
base::FilePath cache_directory_;
- MessageLoop* io_message_loop_;
- MessageLoop* ui_message_loop_;
+ base::MessageLoop* io_message_loop_;
+ base::MessageLoop* ui_message_loop_;
scoped_refptr<SimpleBackendProxy> backend_proxy_;
scoped_refptr<SimpleFrontendProxy> frontend_proxy_;
appcache::AppCacheFrontendImpl frontend_impl_;
diff --git a/webkit/tools/test_shell/simple_file_system.cc b/webkit/tools/test_shell/simple_file_system.cc
index 5078ef6..b3954c7 100644
--- a/webkit/tools/test_shell/simple_file_system.cc
+++ b/webkit/tools/test_shell/simple_file_system.cc
@@ -249,7 +249,7 @@ void SimpleFileSystem::createSnapshotFileAndReadMetadata(
// static
void SimpleFileSystem::InitializeOnIOThread(
webkit_blob::BlobStorageController* blob_storage_controller) {
- g_io_thread = MessageLoop::current();
+ g_io_thread = base::MessageLoop::current();
g_blob_storage_controller = blob_storage_controller;
}
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
index 2a4bae0..69f2011 100644
--- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc
+++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
@@ -343,7 +343,7 @@ class RequestProxy
void Start(ResourceLoaderBridge::Peer* peer, RequestParams* params) {
peer_ = peer;
- owner_loop_ = MessageLoop::current();
+ owner_loop_ = base::MessageLoop::current();
ConvertRequestParamsForFileOverHTTPIfNeeded(params);
// proxy over to the io thread
@@ -367,7 +367,7 @@ class RequestProxy
virtual ~RequestProxy() {
// Ensure we are deleted on the IO thread because base::Timer requires that.
// (guaranteed by the Traits class template parameter).
- DCHECK(MessageLoop::current() == g_io_thread->message_loop());
+ DCHECK(base::MessageLoop::current() == g_io_thread->message_loop());
}
// --------------------------------------------------------------------------
@@ -799,7 +799,7 @@ class RequestProxy
// read buffer for async IO
scoped_refptr<net::IOBuffer> buf_;
- MessageLoop* owner_loop_;
+ base::MessageLoop* owner_loop_;
// This is our peer in WebKit (implemented as ResourceHandleInternal). We do
// not manage its lifetime, and we may only access it from the owner's
@@ -823,7 +823,7 @@ class RequestProxy
// content::BrowserThread::DeleteOnIOThread, but without the dependency).
struct DeleteOnIOThread {
static void Destruct(const RequestProxy* obj) {
- if (MessageLoop::current() == g_io_thread->message_loop())
+ if (base::MessageLoop::current() == g_io_thread->message_loop())
delete obj;
else
g_io_thread->message_loop()->DeleteSoon(FROM_HERE, obj);
@@ -985,7 +985,7 @@ class ResourceLoaderBridgeImpl : public ResourceLoaderBridge {
class CookieSetter : public base::RefCountedThreadSafe<CookieSetter> {
public:
void Set(const GURL& url, const std::string& cookie) {
- DCHECK(MessageLoop::current() == g_io_thread->message_loop());
+ DCHECK(base::MessageLoop::current() == g_io_thread->message_loop());
g_request_context->cookie_store()->SetCookieWithOptionsAsync(
url, cookie, net::CookieOptions(),
net::CookieStore::SetCookiesCallback());
@@ -1119,11 +1119,11 @@ bool SimpleResourceLoaderBridge::EnsureIOThread() {
DCHECK(!g_cache_thread);
g_cache_thread = new base::Thread("cache");
CHECK(g_cache_thread->StartWithOptions(
- base::Thread::Options(MessageLoop::TYPE_IO, 0)));
+ base::Thread::Options(base::MessageLoop::TYPE_IO, 0)));
g_io_thread = new IOThread();
base::Thread::Options options;
- options.message_loop_type = MessageLoop::TYPE_IO;
+ options.message_loop_type = base::MessageLoop::TYPE_IO;
return g_io_thread->StartWithOptions(options);
}
diff --git a/webkit/tools/test_shell/simple_socket_stream_bridge.cc b/webkit/tools/test_shell/simple_socket_stream_bridge.cc
index f43c87b..0367a18 100644
--- a/webkit/tools/test_shell/simple_socket_stream_bridge.cc
+++ b/webkit/tools/test_shell/simple_socket_stream_bridge.cc
@@ -67,7 +67,7 @@ class WebSocketStreamHandleBridgeImpl
void DoOnError(int error_code, const char* error_msg);
int socket_id_;
- MessageLoop* message_loop_;
+ base::MessageLoop* message_loop_;
WebKit::WebSocketStreamHandle* handle_;
webkit_glue::WebSocketStreamHandleDelegate* delegate_;
@@ -82,7 +82,7 @@ WebSocketStreamHandleBridgeImpl::WebSocketStreamHandleBridgeImpl(
WebKit::WebSocketStreamHandle* handle,
webkit_glue::WebSocketStreamHandleDelegate* delegate)
: socket_id_(kNoSocketId),
- message_loop_(MessageLoop::current()),
+ message_loop_(base::MessageLoop::current()),
handle_(handle),
delegate_(delegate),
num_pending_tasks_(0) {
@@ -167,7 +167,7 @@ void WebSocketStreamHandleBridgeImpl::OnError(
}
void WebSocketStreamHandleBridgeImpl::DoConnect(const GURL& url) {
- DCHECK(MessageLoop::current() == g_io_thread);
+ DCHECK(base::MessageLoop::current() == g_io_thread);
socket_ = net::SocketStreamJob::CreateSocketStreamJob(
url, this, g_request_context->transport_security_state(),
g_request_context->ssl_config_service());
@@ -176,7 +176,7 @@ void WebSocketStreamHandleBridgeImpl::DoConnect(const GURL& url) {
}
void WebSocketStreamHandleBridgeImpl::DoSend(std::vector<char>* data) {
- DCHECK(MessageLoop::current() == g_io_thread);
+ DCHECK(base::MessageLoop::current() == g_io_thread);
scoped_ptr<std::vector<char> > scoped_data(data);
if (!socket_)
return;
@@ -185,7 +185,7 @@ void WebSocketStreamHandleBridgeImpl::DoSend(std::vector<char>* data) {
}
void WebSocketStreamHandleBridgeImpl::DoClose() {
- DCHECK(MessageLoop::current() == g_io_thread);
+ DCHECK(base::MessageLoop::current() == g_io_thread);
if (!socket_)
return;
socket_->Close();
@@ -193,14 +193,14 @@ void WebSocketStreamHandleBridgeImpl::DoClose() {
void WebSocketStreamHandleBridgeImpl::DoOnConnected(
int max_pending_send_allowed) {
- DCHECK(MessageLoop::current() == message_loop_);
+ DCHECK(base::MessageLoop::current() == message_loop_);
base::subtle::NoBarrier_AtomicIncrement(&num_pending_tasks_, -1);
if (delegate_)
delegate_->DidOpenStream(handle_, max_pending_send_allowed);
}
void WebSocketStreamHandleBridgeImpl::DoOnSentData(int amount_sent) {
- DCHECK(MessageLoop::current() == message_loop_);
+ DCHECK(base::MessageLoop::current() == message_loop_);
base::subtle::NoBarrier_AtomicIncrement(&num_pending_tasks_, -1);
if (delegate_)
delegate_->DidSendData(handle_, amount_sent);
@@ -208,7 +208,7 @@ void WebSocketStreamHandleBridgeImpl::DoOnSentData(int amount_sent) {
void WebSocketStreamHandleBridgeImpl::DoOnReceivedData(
std::vector<char>* data) {
- DCHECK(MessageLoop::current() == message_loop_);
+ DCHECK(base::MessageLoop::current() == message_loop_);
base::subtle::NoBarrier_AtomicIncrement(&num_pending_tasks_, -1);
scoped_ptr<std::vector<char> > scoped_data(data);
if (delegate_)
@@ -216,7 +216,7 @@ void WebSocketStreamHandleBridgeImpl::DoOnReceivedData(
}
void WebSocketStreamHandleBridgeImpl::DoOnClose() {
- DCHECK(MessageLoop::current() == message_loop_);
+ DCHECK(base::MessageLoop::current() == message_loop_);
base::subtle::NoBarrier_AtomicIncrement(&num_pending_tasks_, -1);
// Don't handle OnClose if there are pending tasks.
DCHECK_EQ(num_pending_tasks_, 0);
@@ -242,7 +242,7 @@ void WebSocketStreamHandleBridgeImpl::DoOnError(
/* static */
void SimpleSocketStreamBridge::InitializeOnIOThread(
net::URLRequestContext* request_context) {
- g_io_thread = MessageLoop::current();
+ g_io_thread = base::MessageLoop::current();
g_request_context = request_context;
}
diff --git a/webkit/tools/test_shell/test_shell_devtools_agent.cc b/webkit/tools/test_shell/test_shell_devtools_agent.cc
index 54e6825..640926d 100644
--- a/webkit/tools/test_shell/test_shell_devtools_agent.cc
+++ b/webkit/tools/test_shell/test_shell_devtools_agent.cc
@@ -24,19 +24,17 @@ namespace {
class WebKitClientMessageLoopImpl
: public WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop {
public:
- WebKitClientMessageLoopImpl() : message_loop_(MessageLoop::current()) { }
- virtual ~WebKitClientMessageLoopImpl() {
- message_loop_ = NULL;
- }
+ WebKitClientMessageLoopImpl() : message_loop_(base::MessageLoop::current()) {}
+ virtual ~WebKitClientMessageLoopImpl() { message_loop_ = NULL; }
virtual void run() {
- MessageLoop::ScopedNestableTaskAllower allow(message_loop_);
+ base::MessageLoop::ScopedNestableTaskAllower allow(message_loop_);
message_loop_->Run();
}
virtual void quitNow() {
message_loop_->QuitNow();
}
private:
- MessageLoop* message_loop_;
+ base::MessageLoop* message_loop_;
};
} // namespace
@@ -77,7 +75,7 @@ WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop*
}
void TestShellDevToolsAgent::AsyncCall(const TestShellDevToolsCallArgs &args) {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&TestShellDevToolsAgent::Call, weak_factory_.GetWeakPtr(),
args));
diff --git a/webkit/tools/test_shell/test_shell_devtools_client.cc b/webkit/tools/test_shell/test_shell_devtools_client.cc
index 7ded3e9..a2c661b 100644
--- a/webkit/tools/test_shell/test_shell_devtools_client.cc
+++ b/webkit/tools/test_shell/test_shell_devtools_client.cc
@@ -65,7 +65,7 @@ void TestShellDevToolsClient::undockWindow() {
}
void TestShellDevToolsClient::AsyncCall(const TestShellDevToolsCallArgs &args) {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&TestShellDevToolsClient::Call, weak_factory_.GetWeakPtr(),
args));
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc
index fad591c..b62ae17 100644
--- a/webkit/tools/test_shell/test_shell_gtk.cc
+++ b/webkit/tools/test_shell/test_shell_gtk.cc
@@ -59,8 +59,8 @@ gboolean MainWindowDestroyed(GtkWindow* window, TestShell* shell) {
TestShell::RemoveWindowFromList(window);
if (TestShell::windowList()->empty() || shell->is_modal()) {
- MessageLoop::current()->PostTask(FROM_HERE,
- MessageLoop::QuitClosure());
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitClosure());
}
delete shell;
diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc
index 38e70e0..13c07ff 100644
--- a/webkit/tools/test_shell/test_shell_main.cc
+++ b/webkit/tools/test_shell/test_shell_main.cc
@@ -90,7 +90,7 @@ int main(int argc, char* argv[]) {
// Allocate a message loop for this thread. Although it is not used
// directly, its constructor sets up some necessary state.
- MessageLoopForUI main_message_loop;
+ base::MessageLoopForUI main_message_loop;
scoped_ptr<base::Environment> env(base::Environment::Create());
bool suppress_error_dialogs = (
@@ -255,7 +255,7 @@ int main(int argc, char* argv[]) {
shell->DumpStatsTableOnExit();
webkit_glue::SetJavaScriptFlags(TestShell::GetJSFlagsForLoad(0));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TestShell::ShutdownTestShell();
diff --git a/webkit/tools/test_shell/test_shell_test.cc b/webkit/tools/test_shell/test_shell_test.cc
index af50477..dc503ed 100644
--- a/webkit/tools/test_shell/test_shell_test.cc
+++ b/webkit/tools/test_shell/test_shell_test.cc
@@ -42,7 +42,7 @@ void TestShellTest::TearDown() {
test_shell_->DestroyWindow(test_shell_->mainWnd());
// Flush the MessageLoop of any residual tasks.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
void TestShellTest::CreateEmptyWindow() {
diff --git a/webkit/tools/test_shell/test_shell_webblobregistry_impl.cc b/webkit/tools/test_shell/test_shell_webblobregistry_impl.cc
index 1dfb46e..a50072d 100644
--- a/webkit/tools/test_shell/test_shell_webblobregistry_impl.cc
+++ b/webkit/tools/test_shell/test_shell_webblobregistry_impl.cc
@@ -67,7 +67,7 @@ BlobData* NewBlobData(const WebBlobData& data) {
/* static */
void TestShellWebBlobRegistryImpl::InitializeOnIOThread(
webkit_blob::BlobStorageController* blob_storage_controller) {
- g_io_thread = MessageLoop::current();
+ g_io_thread = base::MessageLoop::current();
g_blob_storage_controller = blob_storage_controller;
}
diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc
index a11f39e..d2cdb10 100644
--- a/webkit/tools/test_shell/test_shell_win.cc
+++ b/webkit/tools/test_shell/test_shell_win.cc
@@ -509,8 +509,8 @@ LRESULT CALLBACK TestShell::WndProc(HWND hwnd, UINT message, WPARAM wParam,
RemoveWindowFromList(hwnd);
if (TestShell::windowList()->empty() || shell->is_modal()) {
- MessageLoop::current()->PostTask(FROM_HERE,
- MessageLoop::QuitClosure());
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE, base::MessageLoop::QuitClosure());
}
delete shell;
}
diff --git a/webkit/tools/test_shell/test_webview_delegate_gtk.cc b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
index 4ce4a22..715bfdf 100644
--- a/webkit/tools/test_shell/test_webview_delegate_gtk.cc
+++ b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
@@ -104,7 +104,7 @@ void TestWebViewDelegate::show(WebNavigationPolicy policy) {
void TestWebViewDelegate::closeWidgetSoon() {
if (this == shell_->delegate()) {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&gtk_widget_destroy, GTK_WIDGET(shell_->mainWnd())));
} else if (this == shell_->popup_delegate()) {
diff --git a/webkit/tools/test_shell/test_webview_delegate_win.cc b/webkit/tools/test_shell/test_webview_delegate_win.cc
index 6dd8a42..be9a672 100644
--- a/webkit/tools/test_shell/test_webview_delegate_win.cc
+++ b/webkit/tools/test_shell/test_webview_delegate_win.cc
@@ -124,7 +124,7 @@ void TestWebViewDelegate::runModal() {
}
shell_->set_is_modal(true);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
for (WindowList::const_iterator i = wl->begin(); i != wl->end(); ++i)
EnableWindow(*i, TRUE);
diff --git a/webkit/tools/test_shell/webwidget_host.cc b/webkit/tools/test_shell/webwidget_host.cc
index 1e6f96a..676a5a6 100644
--- a/webkit/tools/test_shell/webwidget_host.cc
+++ b/webkit/tools/test_shell/webwidget_host.cc
@@ -8,7 +8,7 @@
#include "base/message_loop.h"
void WebWidgetHost::ScheduleAnimation() {
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&WebWidgetHost::ScheduleComposite, weak_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(10));