Index: chrome/browser/printing/print_job.cc |
diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc |
index b6d59d7eacf51bf5efafafc86570995dbc113131..66473c275dd92ee67625d5d81269966f26e29ac9 100644 |
--- a/chrome/browser/printing/print_job.cc |
+++ b/chrome/browser/printing/print_job.cc |
@@ -6,7 +6,10 @@ |
#include "base/bind.h" |
#include "base/bind_helpers.h" |
+#include "base/location.h" |
#include "base/message_loop/message_loop.h" |
+#include "base/single_thread_task_runner.h" |
+#include "base/thread_task_runner_handle.h" |
#include "base/threading/thread_restrictions.h" |
#include "base/threading/worker_pool.h" |
#include "chrome/browser/chrome_notification_types.h" |
@@ -194,8 +197,9 @@ bool PrintJob::FlushJob(base::TimeDelta timeout) { |
// Make sure the object outlive this message loop. |
scoped_refptr<PrintJob> handle(this); |
- base::MessageLoop::current()->PostDelayedTask(FROM_HERE, |
- base::Bind(&PrintJob::Quit, quit_factory_.GetWeakPtr()), timeout); |
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
+ FROM_HERE, base::Bind(&PrintJob::Quit, quit_factory_.GetWeakPtr()), |
+ timeout); |
base::MessageLoop::ScopedNestableTaskAllower allow( |
base::MessageLoop::current()); |
@@ -360,7 +364,7 @@ void PrintJob::OnNotifyPrintJobEvent(const JobEventDetails& event_details) { |
} |
case JobEventDetails::DOC_DONE: { |
// This will call Stop() and broadcast a JOB_DONE message. |
- base::MessageLoop::current()->PostTask( |
+ base::ThreadTaskRunnerHandle::Get()->PostTask( |
FROM_HERE, base::Bind(&PrintJob::OnDocumentDone, this)); |
break; |
} |