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

Unified Diff: chrome/browser/chromeos/drive/sync_client.cc

Issue 1124813003: [chrome/browser/chromeos/drive] Avoid use of MessageLoopProxy by use of TTRH (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Review Comments 3 : Indent Created 5 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: chrome/browser/chromeos/drive/sync_client.cc
diff --git a/chrome/browser/chromeos/drive/sync_client.cc b/chrome/browser/chromeos/drive/sync_client.cc
index 267edb29fa85751176ce778c1f18916a7db9f02a..43e4b864cebddd71baa9608647f3e61e3d1311c5 100644
--- a/chrome/browser/chromeos/drive/sync_client.cc
+++ b/chrome/browser/chromeos/drive/sync_client.cc
@@ -7,7 +7,7 @@
#include <vector>
#include "base/bind.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/browser/chromeos/drive/drive.pb.h"
#include "chrome/browser/chromeos/drive/file_cache.h"
#include "chrome/browser/chromeos/drive/file_system/download_operation.h"
@@ -323,7 +323,7 @@ void SyncClient::AddTask(const SyncTasks::key_type& key,
tasks_[key] = task;
}
DCHECK_EQ(PENDING, task.state);
- base::MessageLoopProxy::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE,
base::Bind(&SyncClient::StartTask, weak_ptr_factory_.GetWeakPtr(), key),
delay);
@@ -454,7 +454,7 @@ void SyncClient::OnTaskComplete(SyncType type,
}
for (size_t i = 0; i < it->second.waiting_callbacks.size(); ++i) {
- base::MessageLoopProxy::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(it->second.waiting_callbacks[i], error));
}
it->second.waiting_callbacks.clear();
@@ -463,7 +463,7 @@ void SyncClient::OnTaskComplete(SyncType type,
DVLOG(1) << "Running again: type = " << type << ", id = " << local_id;
it->second.state = PENDING;
it->second.should_run_again = false;
- base::MessageLoopProxy::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE,
base::Bind(&SyncClient::StartTask, weak_ptr_factory_.GetWeakPtr(), key),
retry_delay);
« no previous file with comments | « chrome/browser/chromeos/drive/search_metadata_unittest.cc ('k') | chrome/browser/chromeos/drive/sync_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698