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

Side by Side 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: ready 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/printing/cups_print_job_notification_manager.h " 5 #include "chrome/browser/chromeos/printing/cups_print_job_notification_manager.h "
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "chrome/browser/chromeos/printing/cups_print_job.h" 8 #include "chrome/browser/chromeos/printing/cups_print_job.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void CupsPrintJobNotificationManager::OnPrintJobDone(CupsPrintJob* job) { 53 void CupsPrintJobNotificationManager::OnPrintJobDone(CupsPrintJob* job) {
54 DCHECK(base::ContainsKey(notification_map_, job)); 54 DCHECK(base::ContainsKey(notification_map_, job));
55 notification_map_[job]->OnPrintJobStatusUpdated(); 55 notification_map_[job]->OnPrintJobStatusUpdated();
56 } 56 }
57 57
58 void CupsPrintJobNotificationManager::OnPrintJobError(CupsPrintJob* job) { 58 void CupsPrintJobNotificationManager::OnPrintJobError(CupsPrintJob* job) {
59 DCHECK(base::ContainsKey(notification_map_, job)); 59 DCHECK(base::ContainsKey(notification_map_, job));
60 notification_map_[job]->OnPrintJobStatusUpdated(); 60 notification_map_[job]->OnPrintJobStatusUpdated();
61 } 61 }
62 62
63 void CupsPrintJobNotificationManager::OnPrintJobCancelled(CupsPrintJob* job) {
64 auto notification = notification_map_.find(job);
xdai1 2017/02/24 19:17:00 Why not use the same format in the other functions
skau 2017/02/24 23:09:34 I've changed it. I had thought notifications were
65 if (notification != notification_map_.end()) {
66 notification->second->OnPrintJobStatusUpdated();
67 }
68 }
69
63 } // namespace chromeos 70 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698