diff options
author | nduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-15 20:33:46 +0000 |
---|---|---|
committer | nduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-15 20:33:46 +0000 |
commit | edd685f15dfd2841aaeddab567aea0623db1ae69 (patch) | |
tree | 9caa53e84eb2787471dd16009daf02fb85f8890e /webkit | |
parent | 5b79e5250785613d6dc7a42a27a45bb44b9cf7a0 (diff) | |
download | chromium_src-edd685f15dfd2841aaeddab567aea0623db1ae69.zip chromium_src-edd685f15dfd2841aaeddab567aea0623db1ae69.tar.gz chromium_src-edd685f15dfd2841aaeddab567aea0623db1ae69.tar.bz2 |
Add MessageLoopProxy::current
Review URL: http://codereview.chromium.org/7583053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
29 files changed, 64 insertions, 64 deletions
diff --git a/webkit/blob/blob_url_request_job_unittest.cc b/webkit/blob/blob_url_request_job_unittest.cc index 6a0bb6f..e263ca9 100644 --- a/webkit/blob/blob_url_request_job_unittest.cc +++ b/webkit/blob/blob_url_request_job_unittest.cc @@ -254,7 +254,7 @@ class BlobURLRequestJobTest : public testing::Test { blob_url_request_job_ = new BlobURLRequestJob( request_.get(), blob_data, - base::MessageLoopProxy::CreateForCurrentThread()); + base::MessageLoopProxy::current()); // Start the request. if (!extra_headers.IsEmpty()) diff --git a/webkit/blob/deletable_file_reference_unittest.cc b/webkit/blob/deletable_file_reference_unittest.cc index 8d764d9..d7c1d83 100644 --- a/webkit/blob/deletable_file_reference_unittest.cc +++ b/webkit/blob/deletable_file_reference_unittest.cc @@ -14,7 +14,7 @@ namespace webkit_blob { TEST(DeletableFileReferenceTest, TestReferences) { scoped_refptr<base::MessageLoopProxy> loop_proxy = - base::MessageLoopProxy::CreateForCurrentThread(); + base::MessageLoopProxy::current(); ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); diff --git a/webkit/database/database_connections.cc b/webkit/database/database_connections.cc index d90498f..a5d762d 100644 --- a/webkit/database/database_connections.cc +++ b/webkit/database/database_connections.cc @@ -120,7 +120,7 @@ bool DatabaseConnections::RemoveConnectionsHelper( DatabaseConnectionsWrapper::DatabaseConnectionsWrapper() : waiting_for_dbs_to_close_(false), - main_thread_(base::MessageLoopProxy::CreateForCurrentThread()) { + main_thread_(base::MessageLoopProxy::current()) { } DatabaseConnectionsWrapper::~DatabaseConnectionsWrapper() { diff --git a/webkit/database/database_quota_client_unittest.cc b/webkit/database/database_quota_client_unittest.cc index cc2762a..2f29f60 100644 --- a/webkit/database/database_quota_client_unittest.cc +++ b/webkit/database/database_quota_client_unittest.cc @@ -71,7 +71,7 @@ class MockDatabaseTracker : public DatabaseTracker { net::CompletionCallback* callback) { ++delete_called_count_; if (async_delete()) { - base::MessageLoopProxy::CreateForCurrentThread()->PostTask(FROM_HERE, + base::MessageLoopProxy::current()->PostTask(FROM_HERE, NewRunnableMethod(this, &MockDatabaseTracker::AsyncDeleteDataForOrigin, callback)); return net::ERR_IO_PENDING; @@ -205,7 +205,7 @@ class DatabaseQuotaClientTest : public testing::Test { TEST_F(DatabaseQuotaClientTest, GetOriginUsage) { DatabaseQuotaClient client( - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), mock_tracker()); EXPECT_EQ(0, GetOriginUsage(&client, kOriginA, kTemp)); @@ -221,7 +221,7 @@ TEST_F(DatabaseQuotaClientTest, GetOriginUsage) { TEST_F(DatabaseQuotaClientTest, GetOriginsForHost) { DatabaseQuotaClient client( - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), mock_tracker()); EXPECT_EQ(kOriginA.host(), kOriginB.host()); @@ -247,7 +247,7 @@ TEST_F(DatabaseQuotaClientTest, GetOriginsForHost) { TEST_F(DatabaseQuotaClientTest, GetOriginsForType) { DatabaseQuotaClient client( - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), mock_tracker()); EXPECT_TRUE(GetOriginsForType(&client, kTemp).empty()); @@ -263,7 +263,7 @@ TEST_F(DatabaseQuotaClientTest, GetOriginsForType) { TEST_F(DatabaseQuotaClientTest, DeleteOriginData) { DatabaseQuotaClient client( - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), mock_tracker()); // Perm deletions are short circuited in the Client and diff --git a/webkit/database/database_tracker_unittest.cc b/webkit/database/database_tracker_unittest.cc index c6404b1..cf499b9 100644 --- a/webkit/database/database_tracker_unittest.cc +++ b/webkit/database/database_tracker_unittest.cc @@ -540,7 +540,7 @@ class DatabaseTracker_TestHelper_Test { temp_dir.path(), false, true, new TestSpecialStoragePolicy, NULL, - base::MessageLoopProxy::CreateForCurrentThread())); + base::MessageLoopProxy::current())); // Open three new databases. tracker->DatabaseOpened(kOrigin1, kDB1, kDescription, 0, diff --git a/webkit/fileapi/file_system_context_unittest.cc b/webkit/fileapi/file_system_context_unittest.cc index 6913315..2992dfb 100644 --- a/webkit/fileapi/file_system_context_unittest.cc +++ b/webkit/fileapi/file_system_context_unittest.cc @@ -43,8 +43,8 @@ scoped_refptr<FileSystemContext> NewFileSystemContext( bool allow_file_access, bool unlimited_quota, scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy) { - return new FileSystemContext(base::MessageLoopProxy::CreateForCurrentThread(), - base::MessageLoopProxy::CreateForCurrentThread(), + return new FileSystemContext(base::MessageLoopProxy::current(), + base::MessageLoopProxy::current(), special_storage_policy, NULL /* quota manager */, FilePath(), false /* is_incognito */, 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 738c64d..6865957 100644 --- a/webkit/fileapi/file_system_dir_url_request_job_unittest.cc +++ b/webkit/fileapi/file_system_dir_url_request_job_unittest.cc @@ -68,13 +68,13 @@ class FileSystemDirURLRequestJobTest : public testing::Test { virtual void SetUp() { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); - file_thread_proxy_ = base::MessageLoopProxy::CreateForCurrentThread(); + file_thread_proxy_ = base::MessageLoopProxy::current(); special_storage_policy_ = new TestSpecialStoragePolicy(); file_system_context_ = new FileSystemContext( - base::MessageLoopProxy::CreateForCurrentThread(), - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), + base::MessageLoopProxy::current(), special_storage_policy_, NULL, FilePath(), false /* is_incognito */, false, true, diff --git a/webkit/fileapi/file_system_file_util_proxy.cc b/webkit/fileapi/file_system_file_util_proxy.cc index dd86595..162a927 100644 --- a/webkit/fileapi/file_system_file_util_proxy.cc +++ b/webkit/fileapi/file_system_file_util_proxy.cc @@ -18,7 +18,7 @@ class MessageLoopRelay // File thread. explicit MessageLoopRelay(const fileapi::FileSystemOperationContext& context) : origin_message_loop_proxy_( - base::MessageLoopProxy::CreateForCurrentThread()), + base::MessageLoopProxy::current()), error_code_(base::PLATFORM_FILE_OK), context_(context), file_system_file_util_(NULL) { diff --git a/webkit/fileapi/file_system_operation_unittest.cc b/webkit/fileapi/file_system_operation_unittest.cc index 6c609c5..f56dfe5 100644 --- a/webkit/fileapi/file_system_operation_unittest.cc +++ b/webkit/fileapi/file_system_operation_unittest.cc @@ -40,8 +40,8 @@ class MockQuotaManager : public QuotaManager { const GURL& origin, StorageType type) : QuotaManager(false /* is_incognito */, base_dir, - base::MessageLoopProxy::CreateForCurrentThread(), - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), + base::MessageLoopProxy::current(), NULL), origin_(origin), type_(type), @@ -89,7 +89,7 @@ class MockQuotaManagerProxy : public QuotaManagerProxy { public: explicit MockQuotaManagerProxy(QuotaManager* quota_manager) : QuotaManagerProxy(quota_manager, - base::MessageLoopProxy::CreateForCurrentThread()), + base::MessageLoopProxy::current()), registered_client_(NULL) { } diff --git a/webkit/fileapi/file_system_operation_write_unittest.cc b/webkit/fileapi/file_system_operation_write_unittest.cc index 22c26c8..df1ebba 100644 --- a/webkit/fileapi/file_system_operation_write_unittest.cc +++ b/webkit/fileapi/file_system_operation_write_unittest.cc @@ -42,8 +42,8 @@ class MockQuotaManager : public QuotaManager { public: MockQuotaManager(const FilePath& base_dir, int64 quota) : QuotaManager(false /* is_incognito */, base_dir, - base::MessageLoopProxy::CreateForCurrentThread(), - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), + base::MessageLoopProxy::current(), NULL /* special_storage_policy */), usage_(0), quota_(quota) {} @@ -144,7 +144,7 @@ static net::URLRequestJob* BlobURLRequestJobFactory(net::URLRequest* request, return new webkit_blob::BlobURLRequestJob( request, blob_storage_controller->GetBlobDataFromUrl(request->url()), - base::MessageLoopProxy::CreateForCurrentThread()); + base::MessageLoopProxy::current()); } class MockDispatcher : public FileSystemCallbackDispatcher { diff --git a/webkit/fileapi/file_system_path_manager_unittest.cc b/webkit/fileapi/file_system_path_manager_unittest.cc index 122487e..008c077 100644 --- a/webkit/fileapi/file_system_path_manager_unittest.cc +++ b/webkit/fileapi/file_system_path_manager_unittest.cc @@ -240,7 +240,7 @@ class FileSystemPathManagerTest : public testing::Test { bool incognito, bool allow_file_access) { FileSystemPathManager* manager = new FileSystemPathManager( - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), data_dir_.path(), scoped_refptr<quota::SpecialStoragePolicy>( new TestSpecialStoragePolicy()), diff --git a/webkit/fileapi/file_system_quota_client_unittest.cc b/webkit/fileapi/file_system_quota_client_unittest.cc index 2254f51..b78d187 100644 --- a/webkit/fileapi/file_system_quota_client_unittest.cc +++ b/webkit/fileapi/file_system_quota_client_unittest.cc @@ -35,7 +35,7 @@ const quota::StorageType kPersistent = quota::kStorageTypePersistent; class MockFileSystemPathManager : public FileSystemPathManager { public: explicit MockFileSystemPathManager(const FilePath& filesystem_path) - : FileSystemPathManager(base::MessageLoopProxy::CreateForCurrentThread(), + : FileSystemPathManager(base::MessageLoopProxy::current(), filesystem_path, NULL, false, true) {} }; @@ -53,8 +53,8 @@ class FileSystemQuotaClientTest : public testing::Test { ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); file_system_context_ = new FileSystemContext( - base::MessageLoopProxy::CreateForCurrentThread(), - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), + base::MessageLoopProxy::current(), NULL, NULL, FilePath(), false /* is_incognito */, false, true, @@ -72,7 +72,7 @@ class FileSystemQuotaClientTest : public testing::Test { protected: FileSystemQuotaClient* NewQuotaClient(bool is_incognito) { return new FileSystemQuotaClient( - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), file_system_context_, is_incognito); } diff --git a/webkit/fileapi/file_system_quota_unittest.cc b/webkit/fileapi/file_system_quota_unittest.cc index e0bd554..40d6423 100644 --- a/webkit/fileapi/file_system_quota_unittest.cc +++ b/webkit/fileapi/file_system_quota_unittest.cc @@ -213,8 +213,8 @@ void FileSystemQuotaTest::SetUp() { quota_manager_ = new quota::QuotaManager( false /* is_incognito */, filesystem_dir_path, - base::MessageLoopProxy::CreateForCurrentThread(), - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), + base::MessageLoopProxy::current(), NULL); test_helper_.SetUp(filesystem_dir_path, @@ -384,13 +384,13 @@ void FileSystemObfuscatedQuotaTest::SetUp() { quota_manager_ = new quota::QuotaManager( false /* is_incognito */, filesystem_dir_path, - base::MessageLoopProxy::CreateForCurrentThread(), - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), + base::MessageLoopProxy::current(), NULL); file_system_context_ = new FileSystemContext( - base::MessageLoopProxy::CreateForCurrentThread(), - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), + base::MessageLoopProxy::current(), new quota::MockSpecialStoragePolicy(), quota_manager_->proxy(), filesystem_dir_path, diff --git a/webkit/fileapi/file_system_test_helper.cc b/webkit/fileapi/file_system_test_helper.cc index dd5bfa4..535ad76 100644 --- a/webkit/fileapi/file_system_test_helper.cc +++ b/webkit/fileapi/file_system_test_helper.cc @@ -94,8 +94,8 @@ void FileSystemTestOriginHelper::SetUp( file_util_ = file_util; DCHECK(file_util_); file_system_context_ = new FileSystemContext( - base::MessageLoopProxy::CreateForCurrentThread(), - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), + base::MessageLoopProxy::current(), new TestSpecialStoragePolicy(unlimited_quota), quota_manager_proxy, base_dir, @@ -183,7 +183,7 @@ FileSystemOperation* FileSystemTestOriginHelper::NewOperation( DCHECK(file_util_); FileSystemOperation* operation = new FileSystemOperation(callback_dispatcher, - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), file_system_context_.get(), file_util_); InitializeOperationContext(operation->file_system_operation_context()); diff --git a/webkit/fileapi/file_system_url_request_job_unittest.cc b/webkit/fileapi/file_system_url_request_job_unittest.cc index 987adb1..61eee22 100644 --- a/webkit/fileapi/file_system_url_request_job_unittest.cc +++ b/webkit/fileapi/file_system_url_request_job_unittest.cc @@ -92,13 +92,13 @@ class FileSystemURLRequestJobTest : public testing::Test { // TODO(adamk): Run this on the FILE thread we've created as well. file_system_context_ = new FileSystemContext( - base::MessageLoopProxy::CreateForCurrentThread(), - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), + base::MessageLoopProxy::current(), special_storage_policy_, NULL, FilePath(), false /* is_incognito */, false, true, new FileSystemPathManager( - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), temp_dir_.path(), NULL, false, false)); file_system_context_->path_manager()->ValidateFileSystemRootAndGetURL( @@ -134,7 +134,7 @@ class FileSystemURLRequestJobTest : public testing::Test { job_ = new FileSystemURLRequestJob( request_.get(), file_system_context_.get(), - base::MessageLoopProxy::CreateForCurrentThread()); + base::MessageLoopProxy::current()); request_->Start(); ASSERT_TRUE(request_->is_pending()); // verify that we're starting async diff --git a/webkit/fileapi/file_writer_delegate.cc b/webkit/fileapi/file_writer_delegate.cc index 4bb1f9ba..1051277 100644 --- a/webkit/fileapi/file_writer_delegate.cc +++ b/webkit/fileapi/file_writer_delegate.cc @@ -32,7 +32,7 @@ class InitializeTask : public base::RefCountedThreadSafe<InitializeTask> { FileSystemOperationContext* context, InitializeTaskCallback* callback) : origin_message_loop_proxy_( - base::MessageLoopProxy::CreateForCurrentThread()), + base::MessageLoopProxy::current()), error_code_(base::PLATFORM_FILE_OK), file_(file), context_(*context), diff --git a/webkit/fileapi/file_writer_delegate_unittest.cc b/webkit/fileapi/file_writer_delegate_unittest.cc index 5af69c1..fd3ed04 100644 --- a/webkit/fileapi/file_writer_delegate_unittest.cc +++ b/webkit/fileapi/file_writer_delegate_unittest.cc @@ -108,7 +108,7 @@ class FileWriterDelegateTest : public PlatformTest { result_.reset(new Result()); file_writer_delegate_.reset(new FileWriterDelegate( CreateNewOperation(result_.get(), allowed_growth), - offset, base::MessageLoopProxy::CreateForCurrentThread())); + offset, base::MessageLoopProxy::current())); request_.reset(new net::URLRequest(blob_url, file_writer_delegate_.get())); } @@ -359,7 +359,7 @@ TEST_F(FileWriterDelegateTest, WriteSuccessWithoutQuotaLimitConcurrent) { result2.reset(new Result()); file_writer_delegate2.reset(new FileWriterDelegate( CreateNewOperation(result2.get(), QuotaFileUtil::kNoLimit), - 0, base::MessageLoopProxy::CreateForCurrentThread())); + 0, base::MessageLoopProxy::current())); request2.reset(new net::URLRequest(kBlobURL2, file_writer_delegate2.get())); ASSERT_EQ(FileSystemUsageCache::kUsageFileSize, diff --git a/webkit/fileapi/sandbox_mount_point_provider.cc b/webkit/fileapi/sandbox_mount_point_provider.cc index 6570170..920a820 100644 --- a/webkit/fileapi/sandbox_mount_point_provider.cc +++ b/webkit/fileapi/sandbox_mount_point_provider.cc @@ -313,7 +313,7 @@ class SandboxMountPointProvider::GetFileSystemRootPathTask FileSystemPathManager::GetRootPathCallback* callback) : file_message_loop_(file_message_loop), origin_message_loop_proxy_( - base::MessageLoopProxy::CreateForCurrentThread()), + base::MessageLoopProxy::current()), origin_url_(origin_url), type_(type), file_util_(file_util), diff --git a/webkit/fileapi/sandbox_mount_point_provider_unittest.cc b/webkit/fileapi/sandbox_mount_point_provider_unittest.cc index 511a013..d41d46b 100644 --- a/webkit/fileapi/sandbox_mount_point_provider_unittest.cc +++ b/webkit/fileapi/sandbox_mount_point_provider_unittest.cc @@ -28,7 +28,7 @@ namespace fileapi { class MockFileSystemPathManager : public FileSystemPathManager { public: explicit MockFileSystemPathManager(const FilePath& profile_path) - : FileSystemPathManager(base::MessageLoopProxy::CreateForCurrentThread(), + : FileSystemPathManager(base::MessageLoopProxy::current(), profile_path, NULL, false, true) {} }; @@ -161,8 +161,8 @@ class SandboxMountPointProviderMigrationTest : public testing::Test { path_manager_ = new MockFileSystemPathManager(data_dir_.path()); file_system_context_ = new FileSystemContext( - base::MessageLoopProxy::CreateForCurrentThread(), - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), + base::MessageLoopProxy::current(), new TestSpecialStoragePolicy(true /* unlimited quota */), NULL, data_dir_.path(), diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc index 1600c59..f891e9b 100644 --- a/webkit/plugins/ppapi/plugin_module.cc +++ b/webkit/plugins/ppapi/plugin_module.cc @@ -131,7 +131,7 @@ PluginModuleSet* GetLivePluginSet() { base::MessageLoopProxy* GetMainThreadMessageLoop() { static scoped_refptr<base::MessageLoopProxy> proxy( - base::MessageLoopProxy::CreateForCurrentThread()); + base::MessageLoopProxy::current()); return proxy.get(); } diff --git a/webkit/plugins/ppapi/quota_file_io.cc b/webkit/plugins/ppapi/quota_file_io.cc index 852d842..d5af70b 100644 --- a/webkit/plugins/ppapi/quota_file_io.cc +++ b/webkit/plugins/ppapi/quota_file_io.cc @@ -104,7 +104,7 @@ class QuotaFileIO::WriteOperation : public PendingOperationBase { bool finished() const { return finished_; } virtual void WillRunCallback() { - base::MessageLoopProxy::CreateForCurrentThread()->PostTask( + base::MessageLoopProxy::current()->PostTask( FROM_HERE, runnable_factory_.NewRunnableMethod( &WriteOperation::RunCallback)); } diff --git a/webkit/plugins/ppapi/quota_file_io_unittest.cc b/webkit/plugins/ppapi/quota_file_io_unittest.cc index 89b1a80..1e0b360 100644 --- a/webkit/plugins/ppapi/quota_file_io_unittest.cc +++ b/webkit/plugins/ppapi/quota_file_io_unittest.cc @@ -29,7 +29,7 @@ class QuotaMockPluginDelegate : public MockPluginDelegate { QuotaMockPluginDelegate() : available_space_(0), will_update_count_(0), - file_thread_(MessageLoopProxy::CreateForCurrentThread()), + file_thread_(MessageLoopProxy::current()), runnable_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { } virtual ~QuotaMockPluginDelegate() {} @@ -43,7 +43,7 @@ class QuotaMockPluginDelegate : public MockPluginDelegate { quota::StorageType type, Callback* callback) OVERRIDE { DCHECK(callback); - MessageLoopProxy::CreateForCurrentThread()->PostTask( + MessageLoopProxy::current()->PostTask( FROM_HERE, runnable_factory_.NewRunnableMethod( &QuotaMockPluginDelegate::RunAvailableSpaceCallback, callback)); } diff --git a/webkit/quota/mock_quota_manager_unittest.cc b/webkit/quota/mock_quota_manager_unittest.cc index 7188906..503f8aa 100644 --- a/webkit/quota/mock_quota_manager_unittest.cc +++ b/webkit/quota/mock_quota_manager_unittest.cc @@ -39,8 +39,8 @@ class MockQuotaManagerTest : public testing::Test { manager_ = new MockQuotaManager( false /* is_incognito */, data_dir_.path(), - base::MessageLoopProxy::CreateForCurrentThread(), - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), + base::MessageLoopProxy::current(), policy_); } diff --git a/webkit/quota/mock_storage_client.cc b/webkit/quota/mock_storage_client.cc index 203c6cb5..d42ed8d 100644 --- a/webkit/quota/mock_storage_client.cc +++ b/webkit/quota/mock_storage_client.cc @@ -115,7 +115,7 @@ void MockStorageClient::GetOriginUsage(const GURL& origin_url, StorageType type, GetUsageCallback* callback) { usage_callbacks_.insert(callback); - base::MessageLoopProxy::CreateForCurrentThread()->PostTask( + base::MessageLoopProxy::current()->PostTask( FROM_HERE, runnable_factory_.NewRunnableMethod( &MockStorageClient::RunGetOriginUsage, origin_url, type, callback)); @@ -124,7 +124,7 @@ void MockStorageClient::GetOriginUsage(const GURL& origin_url, void MockStorageClient::GetOriginsForType( StorageType type, GetOriginsCallback* callback) { origins_callbacks_.insert(callback); - base::MessageLoopProxy::CreateForCurrentThread()->PostTask( + base::MessageLoopProxy::current()->PostTask( FROM_HERE, runnable_factory_.NewRunnableMethod( &MockStorageClient::RunGetOriginsForType, type, callback)); @@ -134,7 +134,7 @@ void MockStorageClient::GetOriginsForHost( StorageType type, const std::string& host, GetOriginsCallback* callback) { origins_callbacks_.insert(callback); - base::MessageLoopProxy::CreateForCurrentThread()->PostTask( + base::MessageLoopProxy::current()->PostTask( FROM_HERE, runnable_factory_.NewRunnableMethod( &MockStorageClient::RunGetOriginsForHost, type, host, callback)); @@ -144,7 +144,7 @@ void MockStorageClient::DeleteOriginData( const GURL& origin, StorageType type, DeletionCallback* callback) { deletion_callbacks_.insert(callback); - base::MessageLoopProxy::CreateForCurrentThread()->PostTask( + base::MessageLoopProxy::current()->PostTask( FROM_HERE, runnable_factory_.NewRunnableMethod( &MockStorageClient::RunDeleteOriginData, origin, type, callback)); diff --git a/webkit/quota/quota_manager_unittest.cc b/webkit/quota/quota_manager_unittest.cc index f43bd64..3e6b32a 100644 --- a/webkit/quota/quota_manager_unittest.cc +++ b/webkit/quota/quota_manager_unittest.cc @@ -52,8 +52,8 @@ class QuotaManagerTest : public testing::Test { quota_manager_ = new QuotaManager( false /* is_incognito */, data_dir_.path(), - MessageLoopProxy::CreateForCurrentThread(), - MessageLoopProxy::CreateForCurrentThread(), + MessageLoopProxy::current(), + MessageLoopProxy::current(), mock_special_storage_policy_); // Don't (automatically) start the eviction for testing. quota_manager_->eviction_disabled_ = true; diff --git a/webkit/quota/quota_task.cc b/webkit/quota/quota_task.cc index 1f25ddf..f42ae4f 100644 --- a/webkit/quota/quota_task.cc +++ b/webkit/quota/quota_task.cc @@ -27,7 +27,7 @@ void QuotaTask::Start() { QuotaTask::QuotaTask(QuotaTaskObserver* observer) : observer_(observer), - original_message_loop_(MessageLoopProxy::CreateForCurrentThread()) { + original_message_loop_(MessageLoopProxy::current()) { } void QuotaTask::CallCompleted() { diff --git a/webkit/tools/test_shell/simple_file_system.cc b/webkit/tools/test_shell/simple_file_system.cc index 5a0ad62..6b30563 100644 --- a/webkit/tools/test_shell/simple_file_system.cc +++ b/webkit/tools/test_shell/simple_file_system.cc @@ -132,8 +132,8 @@ class SimpleFileSystemCallbackDispatcher SimpleFileSystem::SimpleFileSystem() { if (file_system_dir_.CreateUniqueTempDir()) { file_system_context_ = new FileSystemContext( - base::MessageLoopProxy::CreateForCurrentThread(), - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), + base::MessageLoopProxy::current(), NULL /* special storage policy */, NULL /* quota manager */, file_system_dir_.path(), @@ -298,7 +298,7 @@ FileSystemOperation* SimpleFileSystem::GetNewOperation( SimpleFileSystemCallbackDispatcher* dispatcher = new SimpleFileSystemCallbackDispatcher(AsWeakPtr(), callbacks); FileSystemOperation* operation = new FileSystemOperation( - dispatcher, base::MessageLoopProxy::CreateForCurrentThread(), + dispatcher, base::MessageLoopProxy::current(), file_system_context_.get(), NULL); return operation; } diff --git a/webkit/tools/test_shell/simple_file_writer.cc b/webkit/tools/test_shell/simple_file_writer.cc index 83bc59f..fee2c55 100644 --- a/webkit/tools/test_shell/simple_file_writer.cc +++ b/webkit/tools/test_shell/simple_file_writer.cc @@ -39,7 +39,7 @@ class SimpleFileWriter::IOThreadProxy // The IO thread needs to be running for this class to work. SimpleResourceLoaderBridge::EnsureIOThread(); io_thread_ = SimpleResourceLoaderBridge::GetIoThread(); - main_thread_ = base::MessageLoopProxy::CreateForCurrentThread(); + main_thread_ = base::MessageLoopProxy::current(); } virtual ~IOThreadProxy() { diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc index ff5691c..97de4ce 100644 --- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc +++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc @@ -312,7 +312,7 @@ class RequestProxy : public net::URLRequest::Delegate, FilePath path; if (file_util::CreateTemporaryFile(&path)) { downloaded_file_ = DeletableFileReference::GetOrCreate( - path, base::MessageLoopProxy::CreateForCurrentThread()); + path, base::MessageLoopProxy::current()); file_stream_.Open( path, base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_WRITE); } |