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

Unified Diff: chrome/browser/chromeos/printing/cups_print_job_notification_manager.cc

Issue 2708233006: Report print jobs that are aborted by CUPS as errors. (Closed)
Patch Set: address comments from xdai Created 3 years, 10 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
« no previous file with comments | « chrome/browser/chromeos/printing/cups_print_job_notification_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/printing/cups_print_job_notification_manager.cc
diff --git a/chrome/browser/chromeos/printing/cups_print_job_notification_manager.cc b/chrome/browser/chromeos/printing/cups_print_job_notification_manager.cc
index b7a6636416432e87d7592ee25f6a8d7d0eb9741f..b7a5c7a542d1cd12646ccb5e611e368d76b2c47c 100644
--- a/chrome/browser/chromeos/printing/cups_print_job_notification_manager.cc
+++ b/chrome/browser/chromeos/printing/cups_print_job_notification_manager.cc
@@ -31,31 +31,34 @@ void CupsPrintJobNotificationManager::OnPrintJobCreated(CupsPrintJob* job) {
}
void CupsPrintJobNotificationManager::OnPrintJobStarted(CupsPrintJob* job) {
- DCHECK(base::ContainsKey(notification_map_, job));
- notification_map_[job]->OnPrintJobStatusUpdated();
+ UpdateNotification(job);
}
void CupsPrintJobNotificationManager::OnPrintJobUpdated(CupsPrintJob* job) {
- DCHECK(base::ContainsKey(notification_map_, job));
- notification_map_[job]->OnPrintJobStatusUpdated();
+ UpdateNotification(job);
}
void CupsPrintJobNotificationManager::OnPrintJobSuspended(CupsPrintJob* job) {
- DCHECK(base::ContainsKey(notification_map_, job));
- notification_map_[job]->OnPrintJobStatusUpdated();
+ UpdateNotification(job);
}
void CupsPrintJobNotificationManager::OnPrintJobResumed(CupsPrintJob* job) {
- DCHECK(base::ContainsKey(notification_map_, job));
- notification_map_[job]->OnPrintJobStatusUpdated();
+ UpdateNotification(job);
}
void CupsPrintJobNotificationManager::OnPrintJobDone(CupsPrintJob* job) {
- DCHECK(base::ContainsKey(notification_map_, job));
- notification_map_[job]->OnPrintJobStatusUpdated();
+ UpdateNotification(job);
}
void CupsPrintJobNotificationManager::OnPrintJobError(CupsPrintJob* job) {
+ UpdateNotification(job);
+}
+
+void CupsPrintJobNotificationManager::OnPrintJobCancelled(CupsPrintJob* job) {
+ UpdateNotification(job);
+}
+
+void CupsPrintJobNotificationManager::UpdateNotification(CupsPrintJob* job) {
DCHECK(base::ContainsKey(notification_map_, job));
notification_map_[job]->OnPrintJobStatusUpdated();
}
« no previous file with comments | « chrome/browser/chromeos/printing/cups_print_job_notification_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698