| 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 b8dc24498eb27f9aa1ed0bdceab67cbd6de089fa..2e8e5ddbf7981238dd91eea8b7f9729a04add0b0 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
|
| @@ -108,34 +108,6 @@ Polymer({
|
|
|
| /** @private */
|
| onAddressChanged_: function() {
|
| - this.$.searchInProgress.hidden = false;
|
| - this.$.searchFound.hidden = true;
|
| - this.$.searchNotFound.hidden = true;
|
| -
|
| - var value = this.$.printerAddressInput.value;
|
| - if (this.isValidIpAddress_(value)) {
|
| - // TODO(xdai): Check if the printer address exists after the API is ready.
|
| - this.$.searchInProgress.hidden = true;
|
| - this.$.searchFound.hidden = false;
|
| - this.$.searchNotFound.hidden = true;
|
| - } else {
|
| - this.$.searchInProgress.hidden = true;
|
| - this.$.searchFound.hidden = true;
|
| - this.$.searchNotFound.hidden = false;
|
| - }
|
| - },
|
| -
|
| - /**
|
| - * @param {string} ip
|
| - * @return {boolean}
|
| - * @private
|
| - */
|
| - isValidIpAddress_: function(ip) {
|
| - var addressRegex = RegExp('^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.' +
|
| - '([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.' +
|
| - '([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.' +
|
| - '([01]?\\d\\d?|2[0-4]\\d|25[0-5])$');
|
| - return addressRegex.test(ip);
|
| },
|
|
|
| /**
|
| @@ -145,8 +117,7 @@ Polymer({
|
| * @private
|
| */
|
| addPrinterNotAllowed_: function(printerName, printerAddress) {
|
| - return !printerName || !printerAddress ||
|
| - !this.isValidIpAddress_(printerAddress);
|
| + return !printerName || !printerAddress;
|
| },
|
| });
|
|
|
| @@ -286,6 +257,8 @@ Polymer({
|
| openConfiguringPrinterDialog_: function() {
|
| this.switchDialog_(this.currentDialog_, AddPrinterDialogs.CONFIGURING,
|
| 'showConfiguringDialog_');
|
| + settings.CupsPrintersBrowserProxyImpl.getInstance().
|
| + addCupsPrinter(this.newPrinter);
|
| },
|
|
|
| /** @private */
|
|
|