Commit dc344955 authored by abodenha@chromium.org's avatar abodenha@chromium.org

Use displayname for printer name if it is set

BUG=http://code.google.com/p/chromium-os/issues/detail?id=24025
TEST=If the user sets the name of a printer in cloud print that name should be the displayed name of that printer in the print preview page.


Review URL: http://codereview.chromium.org/8896014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114048 0039d316-1c4b-4281-b951-d872f2087c98
parent 35600f9f
......@@ -401,15 +401,20 @@ cr.define('cloudprint', function() {
if (!trackCloudPrinterAdded(printers[i]['id'])) {
break;
}
if (printers[i]['displayName'] && printers[i]['displayName'] != '')
var name = printers[i]['displayName'];
else
var name = printers[i]['name'];
var option = addDestinationListOptionAtPosition(
lastCloudPrintOptionPos++,
printers[i]['name'],
name,
printers[i]['id'],
printers[i]['name'] == defaultOrLastUsedPrinterName,
name == defaultOrLastUsedPrinterName,
false,
false);
cloudprint.setCloudPrint(option,
printers[i]['name'],
name,
printers[i]['id']);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment