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

Unified Diff: chrome/service/cloud_print/printer_job_handler.cc

Issue 2083363002: Remove calls to deprecated MessageLoop methods in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/service/cloud_print/printer_job_handler.cc
diff --git a/chrome/service/cloud_print/printer_job_handler.cc b/chrome/service/cloud_print/printer_job_handler.cc
index dcc29036199182a611fe7a67c00ea97ef4121236..4df80a2743aefa6dc1efdddd1e61eb8040038c23 100644
--- a/chrome/service/cloud_print/printer_job_handler.cc
+++ b/chrome/service/cloud_print/printer_job_handler.cc
@@ -11,6 +11,7 @@
#include "base/location.h"
#include "base/md5.h"
#include "base/metrics/histogram.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
@@ -247,7 +248,7 @@ void PrinterJobHandler::OnJobChanged() {
void PrinterJobHandler::OnJobSpoolSucceeded(const PlatformJobId& job_id) {
DCHECK(CurrentlyOnPrintThread());
job_spooler_->AddRef();
- print_thread_.message_loop()->ReleaseSoon(FROM_HERE, job_spooler_.get());
+ print_thread_.task_runner()->ReleaseSoon(FROM_HERE, job_spooler_.get());
job_spooler_ = NULL;
job_handler_task_runner_->PostTask(
FROM_HERE, base::Bind(&PrinterJobHandler::JobSpooled, this, job_id));
@@ -256,7 +257,7 @@ void PrinterJobHandler::OnJobSpoolSucceeded(const PlatformJobId& job_id) {
void PrinterJobHandler::OnJobSpoolFailed() {
DCHECK(CurrentlyOnPrintThread());
job_spooler_->AddRef();
- print_thread_.message_loop()->ReleaseSoon(FROM_HERE, job_spooler_.get());
+ print_thread_.task_runner()->ReleaseSoon(FROM_HERE, job_spooler_.get());
job_spooler_ = NULL;
VLOG(1) << "CP_CONNECTOR: Job failed (spool failed)";
job_handler_task_runner_->PostTask(

Powered by Google App Engine
This is Rietveld 408576698