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
|
+ }, |
}); |