Replace MessageLoopProxy with ThreadTaskRunnerHandle in src/sync/.

MessageLoopProxy is deprecated.

BUG=391045

Review URL: https://codereview.chromium.org/375403002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282129 0039d316-1c4b-4281-b951-d872f2087c98
parent e59bbf24
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/thread_task_runner_handle.h"
#include "sync/api/attachments/attachment.h" #include "sync/api/attachments/attachment.h"
#include "sync/internal_api/public/attachments/fake_attachment_downloader.h" #include "sync/internal_api/public/attachments/fake_attachment_downloader.h"
#include "sync/internal_api/public/attachments/fake_attachment_store.h" #include "sync/internal_api/public/attachments/fake_attachment_store.h"
...@@ -127,7 +128,7 @@ AttachmentServiceImpl::~AttachmentServiceImpl() { ...@@ -127,7 +128,7 @@ AttachmentServiceImpl::~AttachmentServiceImpl() {
// Static. // Static.
scoped_ptr<syncer::AttachmentService> AttachmentServiceImpl::CreateForTest() { scoped_ptr<syncer::AttachmentService> AttachmentServiceImpl::CreateForTest() {
scoped_ptr<syncer::AttachmentStore> attachment_store( scoped_ptr<syncer::AttachmentStore> attachment_store(
new syncer::FakeAttachmentStore(base::MessageLoopProxy::current())); new syncer::FakeAttachmentStore(base::ThreadTaskRunnerHandle::Get()));
scoped_ptr<AttachmentUploader> attachment_uploader( scoped_ptr<AttachmentUploader> attachment_uploader(
new FakeAttachmentUploader); new FakeAttachmentUploader);
scoped_ptr<AttachmentDownloader> attachment_downloader( scoped_ptr<AttachmentDownloader> attachment_downloader(
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/thread_task_runner_handle.h"
#include "sync/api/sync_data.h" #include "sync/api/sync_data.h"
namespace syncer { namespace syncer {
...@@ -71,8 +72,10 @@ void AttachmentServiceProxy::GetOrDownloadAttachments( ...@@ -71,8 +72,10 @@ void AttachmentServiceProxy::GetOrDownloadAttachments(
const AttachmentIdList& attachment_ids, const AttachmentIdList& attachment_ids,
const GetOrDownloadCallback& callback) { const GetOrDownloadCallback& callback) {
DCHECK(wrapped_task_runner_); DCHECK(wrapped_task_runner_);
GetOrDownloadCallback proxy_callback = base::Bind( GetOrDownloadCallback proxy_callback =
&ProxyGetOrDownloadCallback, base::MessageLoopProxy::current(), callback); base::Bind(&ProxyGetOrDownloadCallback,
base::ThreadTaskRunnerHandle::Get(),
callback);
wrapped_task_runner_->PostTask( wrapped_task_runner_->PostTask(
FROM_HERE, FROM_HERE,
base::Bind(&AttachmentService::GetOrDownloadAttachments, base::Bind(&AttachmentService::GetOrDownloadAttachments,
...@@ -86,7 +89,7 @@ void AttachmentServiceProxy::DropAttachments( ...@@ -86,7 +89,7 @@ void AttachmentServiceProxy::DropAttachments(
const DropCallback& callback) { const DropCallback& callback) {
DCHECK(wrapped_task_runner_); DCHECK(wrapped_task_runner_);
DropCallback proxy_callback = base::Bind( DropCallback proxy_callback = base::Bind(
&ProxyDropCallback, base::MessageLoopProxy::current(), callback); &ProxyDropCallback, base::ThreadTaskRunnerHandle::Get(), callback);
wrapped_task_runner_->PostTask(FROM_HERE, wrapped_task_runner_->PostTask(FROM_HERE,
base::Bind(&AttachmentService::DropAttachments, base::Bind(&AttachmentService::DropAttachments,
core_, core_,
...@@ -98,7 +101,7 @@ void AttachmentServiceProxy::StoreAttachments(const AttachmentList& attachments, ...@@ -98,7 +101,7 @@ void AttachmentServiceProxy::StoreAttachments(const AttachmentList& attachments,
const StoreCallback& callback) { const StoreCallback& callback) {
DCHECK(wrapped_task_runner_); DCHECK(wrapped_task_runner_);
StoreCallback proxy_callback = base::Bind( StoreCallback proxy_callback = base::Bind(
&ProxyStoreCallback, base::MessageLoopProxy::current(), callback); &ProxyStoreCallback, base::ThreadTaskRunnerHandle::Get(), callback);
wrapped_task_runner_->PostTask( wrapped_task_runner_->PostTask(
FROM_HERE, FROM_HERE,
base::Bind(&AttachmentService::StoreAttachments, base::Bind(&AttachmentService::StoreAttachments,
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include "sync/api/attachments/attachment_service_proxy_for_test.h" #include "sync/api/attachments/attachment_service_proxy_for_test.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_proxy.h" #include "base/thread_task_runner_handle.h"
#include "sync/api/attachments/attachment_service_impl.h" #include "sync/api/attachments/attachment_service_impl.h"
namespace syncer { namespace syncer {
...@@ -39,7 +39,7 @@ AttachmentServiceProxy AttachmentServiceProxyForTest::Create() { ...@@ -39,7 +39,7 @@ AttachmentServiceProxy AttachmentServiceProxyForTest::Create() {
new OwningCore(wrapped.Pass(), weak_ptr_factory.Pass())); new OwningCore(wrapped.Pass(), weak_ptr_factory.Pass()));
scoped_refptr<base::SequencedTaskRunner> runner( scoped_refptr<base::SequencedTaskRunner> runner(
base::MessageLoopProxy::current()); base::ThreadTaskRunnerHandle::Get());
if (!runner) { if (!runner) {
// Dummy runner for tests that don't care about AttachmentServiceProxy. // Dummy runner for tests that don't care about AttachmentServiceProxy.
DVLOG(1) << "Creating dummy MessageLoop for AttachmentServiceProxy."; DVLOG(1) << "Creating dummy MessageLoop for AttachmentServiceProxy.";
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "base/memory/ref_counted_memory.h" #include "base/memory/ref_counted_memory.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_proxy.h" #include "base/thread_task_runner_handle.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "sync/api/attachments/attachment_id.h" #include "sync/api/attachments/attachment_id.h"
#include "sync/api/attachments/attachment_service.h" #include "sync/api/attachments/attachment_service.h"
...@@ -35,7 +35,7 @@ class SyncDataTest : public testing::Test { ...@@ -35,7 +35,7 @@ class SyncDataTest : public testing::Test {
: attachment_service(AttachmentServiceImpl::CreateForTest()), : attachment_service(AttachmentServiceImpl::CreateForTest()),
attachment_service_weak_ptr_factory(attachment_service.get()), attachment_service_weak_ptr_factory(attachment_service.get()),
attachment_service_proxy( attachment_service_proxy(
base::MessageLoopProxy::current(), base::ThreadTaskRunnerHandle::Get(),
attachment_service_weak_ptr_factory.GetWeakPtr()) {} attachment_service_weak_ptr_factory.GetWeakPtr()) {}
base::MessageLoop loop; base::MessageLoop loop;
sync_pb::EntitySpecifics specifics; sync_pb::EntitySpecifics specifics;
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/location.h" #include "base/location.h"
#include "base/message_loop/message_loop_proxy.h"
#include "sync/engine/model_type_entity.h" #include "sync/engine/model_type_entity.h"
#include "sync/engine/model_type_sync_worker.h" #include "sync/engine/model_type_sync_worker.h"
#include "sync/internal_api/public/sync_context_proxy.h" #include "sync/internal_api/public/sync_context_proxy.h"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/thread_task_runner_handle.h"
#include "google_apis/gaia/fake_oauth2_token_service.h" #include "google_apis/gaia/fake_oauth2_token_service.h"
#include "google_apis/gaia/gaia_constants.h" #include "google_apis/gaia/gaia_constants.h"
#include "net/url_request/test_url_fetcher_factory.h" #include "net/url_request/test_url_fetcher_factory.h"
...@@ -111,7 +112,7 @@ class TokenServiceProvider ...@@ -111,7 +112,7 @@ class TokenServiceProvider
}; };
TokenServiceProvider::TokenServiceProvider(OAuth2TokenService* token_service) TokenServiceProvider::TokenServiceProvider(OAuth2TokenService* token_service)
: task_runner_(base::MessageLoopProxy::current()), : task_runner_(base::ThreadTaskRunnerHandle::Get()),
token_service_(token_service) { token_service_(token_service) {
DCHECK(token_service_); DCHECK(token_service_);
} }
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/location.h" #include "base/location.h"
#include "base/memory/ref_counted_memory.h" #include "base/memory/ref_counted_memory.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/sequenced_task_runner.h" #include "base/sequenced_task_runner.h"
#include "base/single_thread_task_runner.h" #include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "sync/api/attachments/attachment.h" #include "sync/api/attachments/attachment.h"
namespace syncer { namespace syncer {
...@@ -96,7 +96,7 @@ void FakeAttachmentStore::Backend::Drop(const AttachmentIdList& ids, ...@@ -96,7 +96,7 @@ void FakeAttachmentStore::Backend::Drop(const AttachmentIdList& ids,
FakeAttachmentStore::FakeAttachmentStore( FakeAttachmentStore::FakeAttachmentStore(
const scoped_refptr<base::SequencedTaskRunner>& backend_task_runner) const scoped_refptr<base::SequencedTaskRunner>& backend_task_runner)
: backend_(new Backend(base::MessageLoopProxy::current())), : backend_(new Backend(base::ThreadTaskRunnerHandle::Get())),
backend_task_runner_(backend_task_runner) {} backend_task_runner_(backend_task_runner) {}
FakeAttachmentStore::~FakeAttachmentStore() {} FakeAttachmentStore::~FakeAttachmentStore() {}
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "base/memory/ref_counted_memory.h" #include "base/memory/ref_counted_memory.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/thread_task_runner_handle.h"
#include "sync/api/attachments/attachment.h" #include "sync/api/attachments/attachment.h"
#include "sync/protocol/sync.pb.h" #include "sync/protocol/sync.pb.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
...@@ -32,7 +33,7 @@ class FakeAttachmentStoreTest : public testing::Test { ...@@ -32,7 +33,7 @@ class FakeAttachmentStoreTest : public testing::Test {
scoped_refptr<base::RefCountedString> some_data1; scoped_refptr<base::RefCountedString> some_data1;
scoped_refptr<base::RefCountedString> some_data2; scoped_refptr<base::RefCountedString> some_data2;
FakeAttachmentStoreTest() : store(base::MessageLoopProxy::current()) {} FakeAttachmentStoreTest() : store(base::ThreadTaskRunnerHandle::Get()) {}
virtual void SetUp() { virtual void SetUp() {
Clear(); Clear();
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "sync/internal_api/public/http_bridge.h" #include "sync/internal_api/public/http_bridge.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
#include "net/base/load_flags.h" #include "net/base/load_flags.h"
#include "net/base/net_errors.h" #include "net/base/net_errors.h"
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "base/message_loop/message_loop_proxy.h"
#include "base/synchronization/waitable_event.h" #include "base/synchronization/waitable_event.h"
#include "base/threading/thread.h" #include "base/threading/thread.h"
#include "net/test/spawned_test_server/spawned_test_server.h" #include "net/test/spawned_test_server/spawned_test_server.h"
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/location.h" #include "base/location.h"
#include "base/message_loop/message_loop_proxy.h" #include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "sync/engine/non_blocking_sync_common.h" #include "sync/engine/non_blocking_sync_common.h"
#include "sync/internal_api/public/sync_context.h" #include "sync/internal_api/public/sync_context.h"
...@@ -31,7 +32,7 @@ void SyncContextProxyImpl::ConnectTypeToSync( ...@@ -31,7 +32,7 @@ void SyncContextProxyImpl::ConnectTypeToSync(
sync_context_, sync_context_,
type, type,
data_type_state, data_type_state,
base::MessageLoopProxy::current(), base::ThreadTaskRunnerHandle::Get(),
type_sync_proxy)); type_sync_proxy));
} }
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
// found in the LICENSE file. // found in the LICENSE file.
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/sequenced_task_runner.h" #include "base/sequenced_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "sync/engine/model_type_sync_proxy_impl.h" #include "sync/engine/model_type_sync_proxy_impl.h"
#include "sync/internal_api/public/base/model_type.h" #include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/sync_context.h" #include "sync/internal_api/public/sync_context.h"
...@@ -18,8 +18,8 @@ namespace syncer { ...@@ -18,8 +18,8 @@ namespace syncer {
class SyncContextProxyImplTest : public ::testing::Test { class SyncContextProxyImplTest : public ::testing::Test {
public: public:
SyncContextProxyImplTest() SyncContextProxyImplTest()
: sync_task_runner_(base::MessageLoopProxy::current()), : sync_task_runner_(base::ThreadTaskRunnerHandle::Get()),
type_task_runner_(base::MessageLoopProxy::current()), type_task_runner_(base::ThreadTaskRunnerHandle::Get()),
registry_(new ModelTypeRegistry()), registry_(new ModelTypeRegistry()),
context_proxy_(sync_task_runner_, registry_->AsWeakPtr()) {} context_proxy_(sync_task_runner_, registry_->AsWeakPtr()) {}
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "base/metrics/histogram.h" #include "base/metrics/histogram.h"
#include "base/observer_list.h" #include "base/observer_list.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
#include "base/thread_task_runner_handle.h"
#include "base/values.h" #include "base/values.h"
#include "sync/engine/sync_scheduler.h" #include "sync/engine/sync_scheduler.h"
#include "sync/engine/syncer_types.h" #include "sync/engine/syncer_types.h"
...@@ -403,7 +404,7 @@ void SyncManagerImpl::Init( ...@@ -403,7 +404,7 @@ void SyncManagerImpl::Init(
weak_core.get(); weak_core.get();
sync_context_proxy_.reset( sync_context_proxy_.reset(
new SyncContextProxyImpl(base::MessageLoopProxy::current(), weak_core)); new SyncContextProxyImpl(base::ThreadTaskRunnerHandle::Get(), weak_core));
// Build a SyncSessionContext and store the worker in it. // Build a SyncSessionContext and store the worker in it.
DVLOG(1) << "Sync is bringing up SyncSessionContext."; DVLOG(1) << "Sync is bringing up SyncSessionContext.";
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include "base/location.h" #include "base/location.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
#include "sync/sessions/model_type_registry.h" #include "sync/sessions/model_type_registry.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/observer_list.h" #include "base/observer_list.h"
#include "base/thread_task_runner_handle.h"
#include "sync/engine/directory_commit_contributor.h" #include "sync/engine/directory_commit_contributor.h"
#include "sync/engine/directory_update_handler.h" #include "sync/engine/directory_update_handler.h"
#include "sync/engine/model_type_sync_proxy.h" #include "sync/engine/model_type_sync_proxy.h"
...@@ -200,7 +200,7 @@ void ModelTypeRegistry::ConnectSyncTypeToWorker( ...@@ -200,7 +200,7 @@ void ModelTypeRegistry::ConnectSyncTypeToWorker(
scoped_ptr<ModelTypeSyncWorker> wrapped_worker( scoped_ptr<ModelTypeSyncWorker> wrapped_worker(
new ModelTypeSyncWorkerWrapper(worker->AsWeakPtr(), new ModelTypeSyncWorkerWrapper(worker->AsWeakPtr(),
scoped_refptr<base::SequencedTaskRunner>( scoped_refptr<base::SequencedTaskRunner>(
base::MessageLoopProxy::current()))); base::ThreadTaskRunnerHandle::Get())));
type_task_runner->PostTask(FROM_HERE, type_task_runner->PostTask(FROM_HERE,
base::Bind(&ModelTypeSyncProxyImpl::OnConnect, base::Bind(&ModelTypeSyncProxyImpl::OnConnect,
proxy_impl, proxy_impl,
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "base/deferred_sequenced_task_runner.h" #include "base/deferred_sequenced_task_runner.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/thread_task_runner_handle.h"
#include "sync/engine/model_type_sync_proxy_impl.h" #include "sync/engine/model_type_sync_proxy_impl.h"
#include "sync/internal_api/public/base/model_type.h" #include "sync/internal_api/public/base/model_type.h"
#include "sync/sessions/model_type_registry.h" #include "sync/sessions/model_type_registry.h"
...@@ -143,7 +144,8 @@ TEST_F(ModelTypeRegistryTest, NonBlockingTypes) { ...@@ -143,7 +144,8 @@ TEST_F(ModelTypeRegistryTest, NonBlockingTypes) {
ModelTypeSyncProxyImpl themes_sync_proxy(syncer::THEMES); ModelTypeSyncProxyImpl themes_sync_proxy(syncer::THEMES);
ModelTypeSyncProxyImpl sessions_sync_proxy(syncer::SESSIONS); ModelTypeSyncProxyImpl sessions_sync_proxy(syncer::SESSIONS);
scoped_refptr<base::DeferredSequencedTaskRunner> task_runner = scoped_refptr<base::DeferredSequencedTaskRunner> task_runner =
new base::DeferredSequencedTaskRunner(base::MessageLoopProxy::current()); new base::DeferredSequencedTaskRunner(
base::ThreadTaskRunnerHandle::Get());
EXPECT_TRUE(registry()->GetEnabledTypes().Empty()); EXPECT_TRUE(registry()->GetEnabledTypes().Empty());
...@@ -173,7 +175,8 @@ TEST_F(ModelTypeRegistryTest, NonBlockingTypesWithDirectoryTypes) { ...@@ -173,7 +175,8 @@ TEST_F(ModelTypeRegistryTest, NonBlockingTypesWithDirectoryTypes) {
ModelTypeSyncProxyImpl themes_sync_proxy(syncer::THEMES); ModelTypeSyncProxyImpl themes_sync_proxy(syncer::THEMES);
ModelTypeSyncProxyImpl sessions_sync_proxy(syncer::SESSIONS); ModelTypeSyncProxyImpl sessions_sync_proxy(syncer::SESSIONS);
scoped_refptr<base::DeferredSequencedTaskRunner> task_runner = scoped_refptr<base::DeferredSequencedTaskRunner> task_runner =
new base::DeferredSequencedTaskRunner(base::MessageLoopProxy::current()); new base::DeferredSequencedTaskRunner(
base::ThreadTaskRunnerHandle::Get());
ModelSafeRoutingInfo routing_info1; ModelSafeRoutingInfo routing_info1;
routing_info1.insert(std::make_pair(NIGORI, GROUP_PASSIVE)); routing_info1.insert(std::make_pair(NIGORI, GROUP_PASSIVE));
...@@ -222,7 +225,8 @@ TEST_F(ModelTypeRegistryTest, DeletionOrdering) { ...@@ -222,7 +225,8 @@ TEST_F(ModelTypeRegistryTest, DeletionOrdering) {
scoped_ptr<ModelTypeSyncProxyImpl> sessions_sync_proxy( scoped_ptr<ModelTypeSyncProxyImpl> sessions_sync_proxy(
new ModelTypeSyncProxyImpl(syncer::SESSIONS)); new ModelTypeSyncProxyImpl(syncer::SESSIONS));
scoped_refptr<base::DeferredSequencedTaskRunner> task_runner = scoped_refptr<base::DeferredSequencedTaskRunner> task_runner =
new base::DeferredSequencedTaskRunner(base::MessageLoopProxy::current()); new base::DeferredSequencedTaskRunner(
base::ThreadTaskRunnerHandle::Get());
EXPECT_TRUE(registry()->GetEnabledTypes().Empty()); EXPECT_TRUE(registry()->GetEnabledTypes().Empty());
......
...@@ -124,6 +124,7 @@ TestDirectory::TestDirectory(Encryptor* encryptor, ...@@ -124,6 +124,7 @@ TestDirectory::TestDirectory(Encryptor* encryptor,
TestDirectory::~TestDirectory() { } TestDirectory::~TestDirectory() { }
TEST(OnDiskSyncableDirectory, FailInitialWrite) { TEST(OnDiskSyncableDirectory, FailInitialWrite) {
base::MessageLoop message_loop;
FakeEncryptor encryptor; FakeEncryptor encryptor;
TestUnrecoverableErrorHandler handler; TestUnrecoverableErrorHandler handler;
base::ScopedTempDir temp_dir; base::ScopedTempDir temp_dir;
......
...@@ -82,8 +82,8 @@ class MyTestURLRequestContext : public net::TestURLRequestContext { ...@@ -82,8 +82,8 @@ class MyTestURLRequestContext : public net::TestURLRequestContext {
class MyTestURLRequestContextGetter : public net::TestURLRequestContextGetter { class MyTestURLRequestContextGetter : public net::TestURLRequestContextGetter {
public: public:
explicit MyTestURLRequestContextGetter( explicit MyTestURLRequestContextGetter(
const scoped_refptr<base::MessageLoopProxy>& io_message_loop_proxy) const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner)
: TestURLRequestContextGetter(io_message_loop_proxy) {} : TestURLRequestContextGetter(io_task_runner) {}
virtual net::TestURLRequestContext* GetURLRequestContext() OVERRIDE { virtual net::TestURLRequestContext* GetURLRequestContext() OVERRIDE {
// Construct |context_| lazily so it gets constructed on the right // Construct |context_| lazily so it gets constructed on the right
......
...@@ -92,8 +92,8 @@ class MyTestURLRequestContext : public net::TestURLRequestContext { ...@@ -92,8 +92,8 @@ class MyTestURLRequestContext : public net::TestURLRequestContext {
class MyTestURLRequestContextGetter : public net::TestURLRequestContextGetter { class MyTestURLRequestContextGetter : public net::TestURLRequestContextGetter {
public: public:
explicit MyTestURLRequestContextGetter( explicit MyTestURLRequestContextGetter(
const scoped_refptr<base::MessageLoopProxy>& io_message_loop_proxy) const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner)
: TestURLRequestContextGetter(io_message_loop_proxy) {} : TestURLRequestContextGetter(io_task_runner) {}
virtual net::TestURLRequestContext* GetURLRequestContext() OVERRIDE { virtual net::TestURLRequestContext* GetURLRequestContext() OVERRIDE {
// Construct |context_| lazily so it gets constructed on the right // Construct |context_| lazily so it gets constructed on the right
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment