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

Unified Diff: chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js

Issue 2866163003: [CUPS] Only allow set up a printer if manufacturer & model or the PPD file is specified. (Closed)
Patch Set: Fix compile error. Created 3 years, 7 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/resources/settings/printing_page/cups_add_printer_dialog.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9049ca6237789b9cd90ab50b38ce2f2b431b1ab6 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,17 @@ 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) {
+ return !!((printerManufacturer && printerModel) || printerPPDPath);
+ },
});
Polymer({
« no previous file with comments | « chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698