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

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

Issue 2341263003: [CUPS] Fix the Printer protocol string that displays in the UI. (Closed)
Patch Set: Created 4 years, 3 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_printer_details_page.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_printer_details_page.js
diff --git a/chrome/browser/resources/settings/printing_page/cups_printer_details_page.js b/chrome/browser/resources/settings/printing_page/cups_printer_details_page.js
index 931c553fbd4816176a1a5a19ad99b52e41fff33b..327ec5fc699ee3e7b65fbadb0ced15fa3ba86bac 100644
--- a/chrome/browser/resources/settings/printing_page/cups_printer_details_page.js
+++ b/chrome/browser/resources/settings/printing_page/cups_printer_details_page.js
@@ -48,4 +48,27 @@ Polymer({
return; // Already handled.
this.advancedExpanded = !this.advancedExpanded;
},
+
+ /**
+ * @param {string} printerProtocol
+ * @return {string} The Printer's protocol that displays in UI
+ * @private
+ */
+ getPrinterProtocol_: function(printerProtocol) {
+ if (printerProtocol == 'ipp')
michaelpg 2016/09/17 02:19:06 Optional: name the strings "printerProtocol_ipp",
xdai1 2016/09/19 22:43:48 Renaming it to "printerProtocol_ipp" seems break t
michaelpg 2016/09/19 23:32:08 That's fine, I just mentioned it as an option. (St
+ return loadTimeData.getString('printerProtocolIpp');
+ if (printerProtocol == 'ipps')
+ return loadTimeData.getString('printerProtocolIpps');
+ if (printerProtocol == 'http')
+ return loadTimeData.getString('printerProtocolHttp');
+ if (printerProtocol == 'https')
+ return loadTimeData.getString('printerProtocolHttps');
+ if (printerProtocol == 'socket')
+ return loadTimeData.getString('printerProtocolAppSocket');
+ if (printerProtocol == 'lpd')
+ return loadTimeData.getString('printerProtocolLpd');
+ if (printerProtocol == 'usb')
+ return loadTimeData.getString('printerProtocolUsb');
+ return '';
michaelpg 2016/09/17 02:19:06 if the printer protocol should always be one of th
xdai1 2016/09/19 22:43:48 Addressed! Yes, the protocol should only be one of
+ },
});
« no previous file with comments | « chrome/browser/resources/settings/printing_page/cups_printer_details_page.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698