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

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

Issue 15836003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 7 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/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 74542a188df8207aa363e5fe67f96f1fd43dbab4..1bc305a3678f2564f49b6e1b053d05945a2bdb30 100644
--- a/chrome/service/cloud_print/printer_job_handler.cc
+++ b/chrome/service/cloud_print/printer_job_handler.cc
@@ -222,7 +222,7 @@ void PrinterJobHandler::OnJobSpoolFailed() {
}
PrinterJobHandler::~PrinterJobHandler() {
- if (printer_watcher_)
+ if (printer_watcher_.get())
printer_watcher_->StopWatching();
}
@@ -538,7 +538,7 @@ void PrinterJobHandler::JobSpooled(PlatformJobId local_job_id) {
}
bool PrinterJobHandler::UpdatePrinterInfo() {
- if (!printer_watcher_) {
+ if (!printer_watcher_.get()) {
LOG(ERROR) << "CP_CONNECTOR: Printer watcher is missing."
<< " Check printer server url for printer id: "
<< printer_info_cloud_.printer_id;
@@ -583,7 +583,7 @@ void PrinterJobHandler::OnReceivePrinterCaps(
const std::string& printer_name,
const printing::PrinterCapsAndDefaults& caps_and_defaults) {
printing::PrinterBasicInfo printer_info;
- if (printer_watcher_)
+ if (printer_watcher_.get())
printer_watcher_->GetCurrentPrinterInfo(&printer_info);
std::string post_data;
@@ -666,8 +666,8 @@ void PrinterJobHandler::OnReceivePrinterCaps(
void PrinterJobHandler::DoPrint(const JobDetails& job_details,
const std::string& printer_name) {
job_spooler_ = print_system_->CreateJobSpooler();
- DCHECK(job_spooler_);
- if (!job_spooler_)
+ DCHECK(job_spooler_.get());
+ if (!job_spooler_.get())
return;
string16 document_name =
printing::PrintBackend::SimplifyDocumentTitle(
« no previous file with comments | « chrome/service/cloud_print/connector_settings_unittest.cc ('k') | chrome/service/cloud_print/printer_job_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698