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

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

Issue 7064006: Print Preview: Fixing printer list when no printer is installed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing console.log() Created 9 years, 7 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 | « 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.js
diff --git a/chrome/browser/resources/print_preview.js b/chrome/browser/resources/print_preview.js
index 9bc3731f709260e2d504da5ab2f1cc35a6328143..a6184e0398deb23847c4cff22b12f09f03373ac0 100644
--- a/chrome/browser/resources/print_preview.js
+++ b/chrome/browser/resources/print_preview.js
@@ -338,7 +338,9 @@ function setPrinters(printers, defaultPrinterIndex) {
addDestinationListOption(printers[i].printerName, printers[i].deviceName,
i == defaultPrinterIndex, false);
}
- addDestinationListOption('','',false, true);
+
+ if (printers.length != 0)
+ addDestinationListOption('','',false, true);
Lei Zhang 2011/05/23 21:46:19 nit: can you put a space after the comma here and
// Adding option for saving PDF to disk.
addDestinationListOption(localStrings.getString('printToPDF'),
« 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