| 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 19499638cd577b7a46a0f850f0cfd48baaa9da5c..d88ba26cf93023ecb3b06dc8876a4812249a36dd 100644
|
| --- a/chrome/browser/resources/print_preview/data/destination_store.js
|
| +++ b/chrome/browser/resources/print_preview/data/destination_store.js
|
| @@ -200,6 +200,15 @@ cr.define('print_preview', function() {
|
| print_preview.DestinationOrigin.CROS :
|
| print_preview.DestinationOrigin.LOCAL;
|
|
|
| + /**
|
| + * Whether to default to the system default printer instead of the most
|
| + * recent destination.
|
| + * @type {boolean}
|
| + * @private
|
| + */
|
| + this.useSystemDefaultAsDefault_ =
|
| + loadTimeData.getBoolean('useSystemDefaultPrinter');
|
| +
|
| this.addEventListeners_();
|
| this.reset_();
|
| }
|
| @@ -639,11 +648,11 @@ cr.define('print_preview', function() {
|
| this.destinationMap_[this.getDestinationKey_(origin,
|
| id, account)];
|
| if (candidate != null) {
|
| - if (!foundDestination)
|
| + if (!foundDestination && !this.useSystemDefaultAsDefault_)
|
| this.selectDestination(candidate);
|
| candidate.isRecent = true;
|
| foundDestination = true;
|
| - } else if (!foundDestination) {
|
| + } else if (!foundDestination && !this.useSystemDefaultAsDefault_) {
|
| foundDestination = this.fetchPreselectedDestination_(
|
| origin,
|
| id,
|
| @@ -655,7 +664,7 @@ cr.define('print_preview', function() {
|
| }
|
| }
|
| }
|
| - if (foundDestination) return;
|
| + if (foundDestination && !this.useSystemDefaultAsDefault_) return;
|
|
|
| // Try the system default
|
| id = this.systemDefaultDestinationId_ || '';
|
|
|