Commit 3fae5295 authored by rbpotter's avatar rbpotter Committed by Commit Bot

Print Preview: Don't load privet printers

Fixed: 1148535
Change-Id: Iab37489f503d07b498e36e1a8c60cd7e3bf7c44f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2536352
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: default avatarDaniel Hosseinian <dhoss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827146}
parent db0d8ae5
...@@ -912,11 +912,17 @@ export class DestinationStore extends EventTarget { ...@@ -912,11 +912,17 @@ export class DestinationStore extends EventTarget {
startLoadAllDestinations() { startLoadAllDestinations() {
// Printer types that need to be retrieved from the handler. // Printer types that need to be retrieved from the handler.
const types = [ const types = [
PrinterType.PRIVET_PRINTER,
PrinterType.EXTENSION_PRINTER, PrinterType.EXTENSION_PRINTER,
PrinterType.LOCAL_PRINTER, PrinterType.LOCAL_PRINTER,
]; ];
// TODO (rbpotter): Remove the code below once this flag and policy are no
// longer supported. Remove the privet flag in M90.
if (loadTimeData.getBoolean('forceEnablePrivetPrinting') ||
loadTimeData.getBoolean('cloudPrintDeprecationWarningsSuppressed')) {
types.push(PrinterType.PRIVET_PRINTER);
}
// Cloud destinations are pulled from the cloud print server instead of the // Cloud destinations are pulled from the cloud print server instead of the
// NativeLayer/PrintPreviewHandler. // NativeLayer/PrintPreviewHandler.
this.startLoadCloudDestinations(); this.startLoadCloudDestinations();
......
...@@ -219,6 +219,10 @@ suite(destination_dialog_test.suiteName, function() { ...@@ -219,6 +219,10 @@ suite(destination_dialog_test.suiteName, function() {
const user2 = 'bar@chromium.org'; const user2 = 'bar@chromium.org';
cloudPrintInterface.setPrinter(getGoogleDriveDestination(user1)); cloudPrintInterface.setPrinter(getGoogleDriveDestination(user1));
cloudPrintInterface.setPrinter(getGoogleDriveDestination(user2)); cloudPrintInterface.setPrinter(getGoogleDriveDestination(user2));
// Override so that privet printers will also be fetched, since we are
// simulating the case where the enterprise override is enabled.
loadTimeData.overrideValues(
{'cloudPrintDeprecationWarningsSuppressed': true});
let userSelect = null; let userSelect = null;
await finishSetup(); await finishSetup();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment