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

Unified Diff: chrome/browser/chromeos/printing/cups_print_job_manager_impl.h

Issue 2748253005: Cleanup jobs which have failed. (Closed)
Patch Set: fix fake Created 3 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
Index: chrome/browser/chromeos/printing/cups_print_job_manager_impl.h
diff --git a/chrome/browser/chromeos/printing/cups_print_job_manager_impl.h b/chrome/browser/chromeos/printing/cups_print_job_manager_impl.h
index 886cf0635597919ba605419600e0c7c93ce5702b..a26392f7e931362eb62989293a75adc23956bea9 100644
--- a/chrome/browser/chromeos/printing/cups_print_job_manager_impl.h
+++ b/chrome/browser/chromeos/printing/cups_print_job_manager_impl.h
@@ -35,7 +35,7 @@ class CupsPrintJobManagerImpl : public CupsPrintJobManager,
~CupsPrintJobManagerImpl() override;
// CupsPrintJobManager overrides:
- bool CancelPrintJob(CupsPrintJob* job) override;
+ void CancelPrintJob(CupsPrintJob* job) override;
bool SuspendPrintJob(CupsPrintJob* job) override;
bool ResumePrintJob(CupsPrintJob* job) override;
@@ -61,12 +61,21 @@ class CupsPrintJobManagerImpl : public CupsPrintJobManager,
// to UpdateJobs.
void PostQuery();
+ // Updates the state of a print job based on |printer_status| and |job|.
+ // Returns true if observers need to be notified of an update.
+ bool UpdatePrintJob(const ::printing::PrinterStatus& printer_status,
+ const ::printing::CupsJob& job,
+ CupsPrintJob* print_job);
+
// Process jobs from CUPS and perform notifications.
void UpdateJobs(const QueryResult& results);
// Mark remaining jobs as errors and remove active jobs.
void PurgeJobs();
+ // Cancel the print job on the blocking thread.
+ void CancelJobImpl(const std::string& printer_id, const int job_id);
+
// Notify observers that a state update has occured for |job|.
void NotifyJobStateUpdate(CupsPrintJob* job);

Powered by Google App Engine
This is Rietveld 408576698