Chromium Code Reviews| Index: chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js |
| diff --git a/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js b/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js |
| index d2270f7c1a2fe01b487d5cc35d01b936cc3ae8d7..761949d28d56cd3bf2285c76ffdeee2f10b41a48 100644 |
| --- a/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js |
| +++ b/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js |
| @@ -287,6 +287,19 @@ Polymer({ |
| getBaseName_: function(path) { |
| return path.substring(path.lastIndexOf('/') + 1); |
| }, |
| + |
| + /** |
| + * @param {string} printerManufacturer |
| + * @param {string} printerModel |
| + * @param {string} printerPPDPath |
| + * @return {boolean} Whether we have enough information to set up the printer |
| + * @private |
| + */ |
| + canAddPrinter_: function(printerManufacturer, printerModel, printerPPDPath) { |
| + if ((printerManufacturer && printerModel) || printerPPDPath) |
|
michaelpg
2017/05/08 23:46:57
nit: just return ((pM && pM) || pP) directly inste
xdai1
2017/05/09 00:34:23
Done.
|
| + return true; |
| + return false; |
| + }, |
| }); |
| Polymer({ |