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

Unified Diff: chrome/browser/resources/print_preview/print_preview_cloud.js

Issue 8896014: Use displayname for printer name if it is set (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview/print_preview_cloud.js
diff --git a/chrome/browser/resources/print_preview/print_preview_cloud.js b/chrome/browser/resources/print_preview/print_preview_cloud.js
index 3c8a10f69c1be05721ef341db351122da38569e0..90961ba3b7ded0459aab4ddd6447752eea7bb9d5 100644
--- a/chrome/browser/resources/print_preview/print_preview_cloud.js
+++ b/chrome/browser/resources/print_preview/print_preview_cloud.js
@@ -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']);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698