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

Unified Diff: components/dom_distiller/core/dom_distiller_store.cc

Issue 1144153004: components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. 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: components/dom_distiller/core/dom_distiller_store.cc
diff --git a/components/dom_distiller/core/dom_distiller_store.cc b/components/dom_distiller/core/dom_distiller_store.cc
index e189d8cd775f3eb06e189b378573b026f18756a0..6d87e311fe19231b9bb7b2d7d7a341afa2cb2409 100644
--- a/components/dom_distiller/core/dom_distiller_store.cc
+++ b/components/dom_distiller/core/dom_distiller_store.cc
@@ -5,8 +5,10 @@
#include "components/dom_distiller/core/dom_distiller_store.h"
#include "base/bind.h"
+#include "base/location.h"
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "components/dom_distiller/core/article_entry.h"
#include "sync/api/sync_change.h"
#include "sync/protocol/article_specifics.pb.h"
@@ -70,8 +72,8 @@ void DomDistillerStore::UpdateAttachments(
scoped_ptr<ArticleAttachmentsData> attachments_data,
const UpdateAttachmentsCallback& callback) {
if (!GetEntryById(entry_id, nullptr)) {
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback, false));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
+ base::Bind(callback, false));
}
scoped_ptr<sync_pb::ArticleAttachments> article_attachments(
@@ -132,8 +134,8 @@ void DomDistillerStore::OnAttachmentsWrite(
ApplyChangesToDatabase(changes_applied);
}
}
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback, success));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
+ base::Bind(callback, success));
}
void DomDistillerStore::GetAttachments(
@@ -142,7 +144,7 @@ void DomDistillerStore::GetAttachments(
ArticleEntry entry;
if (!model_.GetEntryById(entry_id, &entry)
|| !entry.has_attachments()) {
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(callback, false, nullptr));
return;
}
@@ -176,7 +178,7 @@ void DomDistillerStore::OnAttachmentsRead(
attachments_data = ArticleAttachmentsData::GetFromAttachmentMap(
attachments_proto, *attachments);
}
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(callback, success, base::Passed(&attachments_data)));
}
« no previous file with comments | « components/dom_distiller/core/dom_distiller_service.cc ('k') | components/dom_distiller/core/fake_distiller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698