| 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 b084c06bdf9da67c32a7f267b0c5bf07fc4c29ea..d7f562dacbe24a9d0e7b0affd4317f507ecaa642 100644
|
| --- a/chrome/service/cloud_print/printer_job_handler.cc
|
| +++ b/chrome/service/cloud_print/printer_job_handler.cc
|
| @@ -54,7 +54,8 @@ PrinterJobHandler::PrinterJobHandler(
|
| shutting_down_(false),
|
| job_check_pending_(false),
|
| printer_update_pending_(true),
|
| - task_in_progress_(false) {
|
| + task_in_progress_(false),
|
| + ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) {
|
| }
|
|
|
| bool PrinterJobHandler::Initialize() {
|
| @@ -169,7 +170,7 @@ bool PrinterJobHandler::UpdatePrinterInfo() {
|
| print_system_->GetPrinterCapsAndDefaults(
|
| printer_info.printer_name.c_str(),
|
| base::Bind(&PrinterJobHandler::OnReceivePrinterCaps,
|
| - base::Unretained(this)));
|
| + weak_ptr_factory_.GetWeakPtr()));
|
|
|
| // While we are waiting for the data, pretend we have work to do and return
|
| // true.
|
|
|