| Index: chrome/browser/resources/print_preview/data/print_ticket_store.js
|
| diff --git a/chrome/browser/resources/print_preview/data/print_ticket_store.js b/chrome/browser/resources/print_preview/data/print_ticket_store.js
|
| index 0b902f466b23fe4548c0348bbadb4776cb106a47..a39a8dbcc0cf102950609bc92ceda9e0468f1d9c 100644
|
| --- a/chrome/browser/resources/print_preview/data/print_ticket_store.js
|
| +++ b/chrome/browser/resources/print_preview/data/print_ticket_store.js
|
| @@ -376,19 +376,13 @@ cr.define('print_preview', function() {
|
| cjt.print.collate = {collate: this.collate.getValue()};
|
| }
|
| if (this.color.isCapabilityAvailable() && this.color.isUserEdited()) {
|
| - var colorType = this.color.getValue() ?
|
| - 'STANDARD_COLOR' : 'STANDARD_MONOCHROME';
|
| - // Find option with this colorType to read its vendor_id.
|
| - var selectedOptions = destination.capabilities.printer.color.option.
|
| - filter(function(option) {
|
| - return option.type == colorType;
|
| - });
|
| - if (selectedOptions.length == 0) {
|
| + var selectedOption = this.color.getSelectedOption();
|
| + if (!selectedOption) {
|
| console.error('Could not find correct color option');
|
| } else {
|
| - cjt.print.color = {type: colorType};
|
| - if (selectedOptions[0].hasOwnProperty('vendor_id')) {
|
| - cjt.print.color.vendor_id = selectedOptions[0].vendor_id;
|
| + cjt.print.color = {type: selectedOption.type};
|
| + if (selectedOption.hasOwnProperty('vendor_id')) {
|
| + cjt.print.color.vendor_id = selectedOption.vendor_id;
|
| }
|
| }
|
| }
|
|
|