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

Unified Diff: chrome/browser/printing/print_job.cc

Issue 1815363002: Add RetainedRef uses where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/printing/print_job.cc
diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc
index 55a3b8e934c593391642ff8eaa5dc77fc7d58ea6..6acbc2366dbe12b03428f225130fda9313a3fdd9 100644
--- a/chrome/browser/printing/print_job.cc
+++ b/chrome/browser/printing/print_job.cc
@@ -131,11 +131,10 @@ void PrintJob::StartPrinting() {
// Real work is done in PrintJobWorker::StartPrinting().
worker_->PostTask(FROM_HERE,
- base::Bind(&HoldRefCallback,
- make_scoped_refptr(this),
+ base::Bind(&HoldRefCallback, make_scoped_refptr(this),
base::Bind(&PrintJobWorker::StartPrinting,
base::Unretained(worker_.get()),
- document_)));
+ base::RetainedRef(document_))));
// Set the flag right now.
is_job_pending_ = true;
@@ -332,11 +331,10 @@ void PrintJob::UpdatePrintedDocument(PrintedDocument* new_document) {
DCHECK(!is_job_pending_);
// Sync the document with the worker.
worker_->PostTask(FROM_HERE,
- base::Bind(&HoldRefCallback,
- make_scoped_refptr(this),
+ base::Bind(&HoldRefCallback, make_scoped_refptr(this),
base::Bind(&PrintJobWorker::OnDocumentChanged,
base::Unretained(worker_.get()),
- document_)));
+ base::RetainedRef(document_))));
}
}

Powered by Google App Engine
This is Rietveld 408576698