Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: sync/engine/sync_scheduler_impl.cc

Issue 1942053002: Deletes base::MessageLoop::set_thread_name(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed media_unittests Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sync/engine/sync_scheduler_impl.cc
diff --git a/sync/engine/sync_scheduler_impl.cc b/sync/engine/sync_scheduler_impl.cc
index e6b5a764875a38454370097925f1dcab1af9e312..a0594ca4c8416387891ad040c924453be95ca258 100644
--- a/sync/engine/sync_scheduler_impl.cc
+++ b/sync/engine/sync_scheduler_impl.cc
@@ -13,7 +13,7 @@
#include "base/compiler_specific.h"
#include "base/location.h"
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
+#include "base/thread_task_runner_handle.h"
gab 2016/05/12 15:50:57 FYI, that header moved to base/threading/thread_ta
#include "sync/engine/backoff_delay_provider.h"
#include "sync/engine/syncer.h"
#include "sync/protocol/proto_enum_conversions.h"
@@ -226,7 +226,8 @@ void SyncSchedulerImpl::OnServerConnectionErrorFixed() {
void SyncSchedulerImpl::Start(Mode mode, base::Time last_poll_time) {
DCHECK(CalledOnValidThread());
- std::string thread_name = base::MessageLoop::current()->thread_name();
+ std::string thread_name =
+ base::ThreadTaskRunnerHandle::Get()->GetThreadName();
if (thread_name.empty())
thread_name = "<Main thread>";
SDVLOG(2) << "Start called from thread "
@@ -746,9 +747,9 @@ void SyncSchedulerImpl::TryCanaryJob() {
void SyncSchedulerImpl::TrySyncSessionJob() {
// Post call to TrySyncSessionJobImpl on current thread. Later request for
// access token will be here.
- base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
- &SyncSchedulerImpl::TrySyncSessionJobImpl,
- weak_ptr_factory_.GetWeakPtr()));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&SyncSchedulerImpl::TrySyncSessionJobImpl,
+ weak_ptr_factory_.GetWeakPtr()));
}
void SyncSchedulerImpl::TrySyncSessionJobImpl() {
« content/test/test_blink_web_unit_test_support.cc ('K') | « remoting/base/auto_thread_task_runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698