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

Side by Side Diff: chrome/browser/chromeos/printing/cups_print_job_manager_impl.cc

Issue 2925113004: Record the correct value for print job results. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_manager_impl.h" 5 #include "chrome/browser/chromeos/printing/cups_print_job_manager_impl.h"
6 6
7 #include <cups/cups.h> 7 #include <cups/cups.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 case State::STATE_CANCELLED: 66 case State::STATE_CANCELLED:
67 return PRINTER_CANCEL; 67 return PRINTER_CANCEL;
68 default: 68 default:
69 break; 69 break;
70 } 70 }
71 71
72 return UNKNOWN; 72 return UNKNOWN;
73 } 73 }
74 74
75 void RecordJobResult(JobResultForHistogram result) { 75 void RecordJobResult(JobResultForHistogram result) {
76 UMA_HISTOGRAM_ENUMERATION("Printing.CUPS.JobResult", TIMEOUT_CANCEL, 76 UMA_HISTOGRAM_ENUMERATION("Printing.CUPS.JobResult", result, RESULT_MAX);
77 RESULT_MAX);
78 } 77 }
79 78
80 // Returns the equivalient CupsPrintJob#State from a CupsJob#JobState. 79 // Returns the equivalient CupsPrintJob#State from a CupsJob#JobState.
81 chromeos::CupsPrintJob::State ConvertState(printing::CupsJob::JobState state) { 80 chromeos::CupsPrintJob::State ConvertState(printing::CupsJob::JobState state) {
82 switch (state) { 81 switch (state) {
83 case printing::CupsJob::PENDING: 82 case printing::CupsJob::PENDING:
84 return State::STATE_WAITING; 83 return State::STATE_WAITING;
85 case printing::CupsJob::HELD: 84 case printing::CupsJob::HELD:
86 return State::STATE_SUSPENDED; 85 return State::STATE_SUSPENDED;
87 case printing::CupsJob::PROCESSING: 86 case printing::CupsJob::PROCESSING:
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 break; 472 break;
474 } 473 }
475 } 474 }
476 475
477 // static 476 // static
478 CupsPrintJobManager* CupsPrintJobManager::CreateInstance(Profile* profile) { 477 CupsPrintJobManager* CupsPrintJobManager::CreateInstance(Profile* profile) {
479 return new CupsPrintJobManagerImpl(profile); 478 return new CupsPrintJobManagerImpl(profile);
480 } 479 }
481 480
482 } // namespace chromeos 481 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698