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

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

Issue 8600007: base::Bind: Convert chrome/service/cloud_print. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and review fixes. Created 9 years, 1 month 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/service/cloud_print/print_system_win.cc ('k') | chrome/service/service_utility_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « chrome/service/cloud_print/print_system_win.cc ('k') | chrome/service/service_utility_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698