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

Unified Diff: chrome/browser/chromeos/drive/change_list_loader.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: 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/change_list_loader.cc
diff --git a/chrome/browser/chromeos/drive/change_list_loader.cc b/chrome/browser/chromeos/drive/change_list_loader.cc
index 143927a49cf646e75eb7ef1a40dd44fcb1ff636d..d0816105c1b3ecf61f1f42d8b06d46256a62fdd8 100644
--- a/chrome/browser/chromeos/drive/change_list_loader.cc
+++ b/chrome/browser/chromeos/drive/change_list_loader.cc
@@ -11,6 +11,7 @@
#include "base/metrics/histogram.h"
#include "base/strings/string_number_conversions.h"
#include "base/synchronization/cancellation_flag.h"
+#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "chrome/browser/chromeos/drive/change_list_loader_observer.h"
#include "chrome/browser/chromeos/drive/change_list_processor.h"
@@ -226,11 +227,10 @@ void AboutResourceLoader::GetAboutResource(
}
if (cached_about_resource_) {
- base::MessageLoopProxy::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(
- callback,
- google_apis::HTTP_NO_CONTENT,
+ callback, google_apis::HTTP_NO_CONTENT,
base::Passed(scoped_ptr<google_apis::AboutResource>(
new google_apis::AboutResource(*cached_about_resource_)))));
} else {
@@ -461,9 +461,8 @@ void ChangeListLoader::OnChangeListLoadComplete(FileError error) {
}
for (size_t i = 0; i < pending_load_callback_.size(); ++i) {
- base::MessageLoopProxy::current()->PostTask(
- FROM_HERE,
- base::Bind(pending_load_callback_[i], error));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(pending_load_callback_[i], error));
}
pending_load_callback_.clear();

Powered by Google App Engine
This is Rietveld 408576698