| Index: sync/internal_api/sync_encryption_handler_impl.cc
|
| diff --git a/sync/internal_api/sync_encryption_handler_impl.cc b/sync/internal_api/sync_encryption_handler_impl.cc
|
| index 8a0b6cf50eac8dcab91756276ba660b8de3f57ae..a4aafb6c9189efe9f10ab0d3f45174e844257542 100644
|
| --- a/sync/internal_api/sync_encryption_handler_impl.cc
|
| +++ b/sync/internal_api/sync_encryption_handler_impl.cc
|
| @@ -14,8 +14,10 @@
|
| #include "base/base64.h"
|
| #include "base/bind.h"
|
| #include "base/json/json_string_value_serializer.h"
|
| -#include "base/message_loop/message_loop.h"
|
| +#include "base/location.h"
|
| #include "base/metrics/histogram.h"
|
| +#include "base/single_thread_task_runner.h"
|
| +#include "base/threading/thread_task_runner_handle.h"
|
| #include "base/time/time.h"
|
| #include "base/tracked_objects.h"
|
| #include "sync/internal_api/public/read_node.h"
|
| @@ -656,10 +658,9 @@ void SyncEncryptionHandlerImpl::ApplyNigoriUpdate(
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| DCHECK(trans);
|
| if (!ApplyNigoriUpdateImpl(nigori, trans)) {
|
| - base::MessageLoop::current()->PostTask(
|
| - FROM_HERE,
|
| - base::Bind(&SyncEncryptionHandlerImpl::RewriteNigori,
|
| - weak_ptr_factory_.GetWeakPtr()));
|
| + base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| + FROM_HERE, base::Bind(&SyncEncryptionHandlerImpl::RewriteNigori,
|
| + weak_ptr_factory_.GetWeakPtr()));
|
| }
|
|
|
| FOR_EACH_OBSERVER(
|
| @@ -744,10 +745,9 @@ bool SyncEncryptionHandlerImpl::SetKeystoreKeys(
|
| // Note that triggering migration will have no effect if we're already
|
| // properly migrated with the newest keystore keys.
|
| if (ShouldTriggerMigration(nigori, *cryptographer)) {
|
| - base::MessageLoop::current()->PostTask(
|
| - FROM_HERE,
|
| - base::Bind(&SyncEncryptionHandlerImpl::RewriteNigori,
|
| - weak_ptr_factory_.GetWeakPtr()));
|
| + base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| + FROM_HERE, base::Bind(&SyncEncryptionHandlerImpl::RewriteNigori,
|
| + weak_ptr_factory_.GetWeakPtr()));
|
| }
|
|
|
| return true;
|
|
|