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

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

Issue 2517063002: M56: Print Preview: Fix handling of printers without capabilities. (Closed)
Patch Set: Created 4 years, 1 month 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 | chrome/browser/ui/webui/print_preview/printer_capabilities.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview/data/destination_store.js
diff --git a/chrome/browser/resources/print_preview/data/destination_store.js b/chrome/browser/resources/print_preview/data/destination_store.js
index 785ca4c194cecbbc1e659e18394ea004e272b61b..2258b65a74e60867ae351a37b866fc9db41353b5 100644
--- a/chrome/browser/resources/print_preview/data/destination_store.js
+++ b/chrome/browser/resources/print_preview/data/destination_store.js
@@ -509,6 +509,9 @@ cr.define('print_preview', function() {
* @private
*/
DestinationStore.localizeCapabilities_ = function(capabilities) {
+ if (!capabilities.printer)
+ return capabilities;
+
var mediaSize = capabilities.printer.media_size;
if (!mediaSize)
return capabilities;
@@ -545,6 +548,9 @@ cr.define('print_preview', function() {
* @private
*/
DestinationStore.sortMediaSizes_ = function(capabilities) {
+ if (!capabilities.printer)
+ return capabilities;
+
var mediaSize = capabilities.printer.media_size;
if (!mediaSize)
return capabilities;
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview/printer_capabilities.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698