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 5a231c8f3a8acf2fcd46e86edab1e8d01cadcb14..2c05e297c7a5b73aa8f33a6bcdea3548721c7c31 100644 |
--- a/chrome/service/cloud_print/printer_job_handler.cc |
+++ b/chrome/service/cloud_print/printer_job_handler.cc |
@@ -5,6 +5,7 @@ |
#include "chrome/service/cloud_print/printer_job_handler.h" |
#include "base/bind.h" |
+#include "base/bind_helpers.h" |
#include "base/file_util.h" |
#include "base/json/json_reader.h" |
#include "base/md5.h" |
@@ -161,13 +162,14 @@ bool PrinterJobHandler::UpdatePrinterInfo() { |
// First asynchronously fetch the capabilities. |
printing::PrinterBasicInfo printer_info; |
printer_watcher_->GetCurrentPrinterInfo(&printer_info); |
- cloud_print::PrintSystem::PrinterCapsAndDefaultsCallback* callback = |
- NewCallback(this, |
- &PrinterJobHandler::OnReceivePrinterCaps); |
- // Asnchronously fetch the printer caps and defaults. The story will |
+ |
+ // Asynchronously fetch the printer caps and defaults. The story will |
// continue in OnReceivePrinterCaps. |
print_system_->GetPrinterCapsAndDefaults( |
- printer_info.printer_name.c_str(), callback); |
+ printer_info.printer_name.c_str(), |
+ base::Bind(&PrinterJobHandler::OnReceivePrinterCaps, |
+ base::Unretained(this))); |
+ |
// While we are waiting for the data, pretend we have work to do and return |
// true. |
return true; |