Chromium Code Reviews| Index: sync/api/attachments/attachment_service_proxy_for_test.cc |
| diff --git a/sync/api/attachments/attachment_service_proxy_for_test.cc b/sync/api/attachments/attachment_service_proxy_for_test.cc |
| index 7f9f873b289b4225e7b4b5696e37afc8fc4e5057..8826991429b0a0b7c32e5d9af47105183bc32081 100644 |
| --- a/sync/api/attachments/attachment_service_proxy_for_test.cc |
| +++ b/sync/api/attachments/attachment_service_proxy_for_test.cc |
| @@ -4,6 +4,7 @@ |
| #include "sync/api/attachments/attachment_service_proxy_for_test.h" |
| +#include "base/message_loop/message_loop.h" |
| #include "base/message_loop/message_loop_proxy.h" |
| #include "sync/api/attachments/fake_attachment_service.h" |
| @@ -36,8 +37,16 @@ AttachmentServiceProxy AttachmentServiceProxyForTest::Create() { |
| scoped_refptr<Core> core_for_test( |
| new OwningCore(wrapped.Pass(), weak_ptr_factory.Pass())); |
| - return AttachmentServiceProxyForTest(base::MessageLoopProxy::current(), |
| - core_for_test); |
| + |
| + scoped_refptr<base::SequencedTaskRunner> runner( |
| + base::MessageLoopProxy::current()); |
| + if (!runner) { |
| + // Dummy runner for tests that don't care about AttachmentServiceProxy. |
| + DLOG(WARNING) << "Creating dummy MessageLoop for AttachmentServiceProxy."; |
|
maniscalco
2014/04/28 16:05:12
I'm not real familiar with logging conventions in
tim (not reviewing)
2014/04/28 18:41:29
Hmm, I'll make it a DVLOG(1). I was worried that
|
| + base::MessageLoop loop; |
|
maniscalco
2014/04/28 16:05:12
Can you update the ASPFT class comment now that it
tim (not reviewing)
2014/04/28 18:41:29
Done.
|
| + runner = loop.message_loop_proxy(); |
| + } |
| + return AttachmentServiceProxyForTest(runner, core_for_test); |
| } |
| AttachmentServiceProxyForTest::~AttachmentServiceProxyForTest() { |