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

Unified Diff: chrome/browser/printing/print_job_worker.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
« no previous file with comments | « chrome/browser/printing/print_job.cc ('k') | chrome/browser/printing/pwg_raster_converter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_job_worker.cc
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
index e7cdf14c7fd54397ec6d955098f017c5714e6b00..283a5090570a0d676f143183d66590eaa9f74ac9 100644
--- a/chrome/browser/printing/print_job_worker.cc
+++ b/chrome/browser/printing/print_job_worker.cc
@@ -374,11 +374,9 @@ void PrintJobWorker::OnDocumentDone() {
}
owner_->PostTask(FROM_HERE,
- base::Bind(&NotificationCallback,
- make_scoped_refptr(owner_),
+ base::Bind(&NotificationCallback, base::RetainedRef(owner_),
JobEventDetails::DOC_DONE,
- document_,
- scoped_refptr<PrintedPage>()));
+ base::RetainedRef(document_), nullptr));
// Makes sure the variables are reinitialized.
document_ = NULL;
@@ -389,12 +387,11 @@ void PrintJobWorker::SpoolPage(PrintedPage* page) {
DCHECK_NE(page_number_, PageNumber::npos());
// Signal everyone that the page is about to be printed.
- owner_->PostTask(FROM_HERE,
- base::Bind(&NotificationCallback,
- make_scoped_refptr(owner_),
- JobEventDetails::NEW_PAGE,
- document_,
- make_scoped_refptr(page)));
+ owner_->PostTask(
+ FROM_HERE,
+ base::Bind(&NotificationCallback, base::RetainedRef(owner_),
+ JobEventDetails::NEW_PAGE, base::RetainedRef(document_),
+ base::RetainedRef(page)));
// Preprocess.
if (printing_context_->NewPage() != PrintingContext::OK) {
@@ -416,12 +413,11 @@ void PrintJobWorker::SpoolPage(PrintedPage* page) {
}
// Signal everyone that the page is printed.
- owner_->PostTask(FROM_HERE,
- base::Bind(&NotificationCallback,
- make_scoped_refptr(owner_),
- JobEventDetails::PAGE_DONE,
- document_,
- make_scoped_refptr(page)));
+ owner_->PostTask(
+ FROM_HERE,
+ base::Bind(&NotificationCallback, base::RetainedRef(owner_),
+ JobEventDetails::PAGE_DONE, base::RetainedRef(document_),
+ base::RetainedRef(page)));
}
void PrintJobWorker::OnFailure() {
@@ -431,11 +427,9 @@ void PrintJobWorker::OnFailure() {
scoped_refptr<PrintJobWorkerOwner> handle(owner_);
owner_->PostTask(FROM_HERE,
- base::Bind(&NotificationCallback,
- make_scoped_refptr(owner_),
+ base::Bind(&NotificationCallback, base::RetainedRef(owner_),
JobEventDetails::FAILED,
- document_,
- scoped_refptr<PrintedPage>()));
+ base::RetainedRef(document_), nullptr));
Cancel();
// Makes sure the variables are reinitialized.
« no previous file with comments | « chrome/browser/printing/print_job.cc ('k') | chrome/browser/printing/pwg_raster_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698