OLD | NEW |
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 #ifndef CHROME_BROWSER_CHROMEOS_PRINTING_PRINTER_CONFIGURER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_PRINTING_PRINTER_CONFIGURER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_PRINTING_PRINTER_CONFIGURER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_PRINTING_PRINTER_CONFIGURER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
11 #include "chromeos/printing/printer_configuration.h" | 11 #include "chromeos/printing/printer_configuration.h" |
12 | 12 |
13 class Profile; | 13 class Profile; |
14 | 14 |
15 namespace chromeos { | 15 namespace chromeos { |
16 | 16 |
| 17 // These values are written to logs. New enum values can be added, but existing |
| 18 // enums must never be renumbered or deleted and reused. |
17 enum PrinterSetupResult { | 19 enum PrinterSetupResult { |
18 kFatalError = 0, // Setup failed in an unrecognized way | 20 kFatalError = 0, // Setup failed in an unrecognized way |
19 kSuccess = 1, // Printer set up successfully | 21 kSuccess = 1, // Printer set up successfully |
20 kPrinterUnreachable = 2, // Could not reach printer | 22 kPrinterUnreachable = 2, // Could not reach printer |
21 kDbusError = 3, // Could not contact debugd | 23 kDbusError = 3, // Could not contact debugd |
22 // Space left for additional errors | 24 // Space left for additional errors |
23 | 25 |
24 // PPD errors | 26 // PPD errors |
25 kPpdTooLarge = 10, // PPD exceeds size limit | 27 kPpdTooLarge = 10, // PPD exceeds size limit |
26 kInvalidPpd = 11, // PPD rejected by cupstestppd | 28 kInvalidPpd = 11, // PPD rejected by cupstestppd |
(...skipping 22 matching lines...) Expand all Loading... |
49 virtual void SetUpPrinter(const Printer& printer, | 51 virtual void SetUpPrinter(const Printer& printer, |
50 const PrinterSetupCallback& callback) = 0; | 52 const PrinterSetupCallback& callback) = 0; |
51 | 53 |
52 protected: | 54 protected: |
53 PrinterConfigurer() = default; | 55 PrinterConfigurer() = default; |
54 }; | 56 }; |
55 | 57 |
56 } // namespace chromeos | 58 } // namespace chromeos |
57 | 59 |
58 #endif // CHROME_BROWSER_CHROMEOS_PRINTING_PRINTER_CONFIGURER_H_ | 60 #endif // CHROME_BROWSER_CHROMEOS_PRINTING_PRINTER_CONFIGURER_H_ |
OLD | NEW |