New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 829414 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug

Blocking:
issue 829412
issue 848987



Sign in to add a comment

Cloud print WebUI issues direct network requests

Project Member Reported by roc...@chromium.org, Apr 5 2018

Issue description

It uses direct XHRs to fetch device information. These XHRs should instead be initiated from a network-navigated subframe to ensure isolation from the WebUI process.

See  bug 829218  and bug 829412 for some additional details.
 
Cc: groby@chromium.org dougt@chromium.org dpa...@chromium.org
Components: UI>Browser>PrintPreview
Clarification: the issue is with the cloud print interface in the Print Preview WebUI, not with the local discovery web UI that registers printers with cloud print.

We have discussed trying to move the cloud print interaction into the C++ handler in the past, so that might be another option. This was motivated by the case of printing specifically, where the printed document has to be sent from the handler to Print Preview only to be sent again to the cloud print server.
Thanks for the additional clarification!

FYI for now I'm going to re-enable the DCHECK with an exception whitelist so that cloud print doesn't break.
Labels: -Pri-2 OS-Chrome OS-Linux OS-Mac OS-Windows Pri-3
Status: Available (was: Untriaged)
We'll get to this eventually.
Cc: rbpotter@chromium.org
There is a whitelist entry associated with this bug here: https://chromium.googlesource.com/chromium/src/+/c74cbd49/extensions/browser/api/web_request/web_request_permissions.cc#100

Though that has no effect on  bug 848987 . We probably want to fix  bug 848987  first, and see if that makes this bug go away.
Blocking: 848987
Labels: -Pri-3 Target-70 Pri-1
Increasing priority and adding milestone due to high priority of  bug 848987 .
Project Member

Comment 8 by bugdroid1@chromium.org, Jul 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ea795e02c92ad9b476b3996600b2c5acbf716645

commit ea795e02c92ad9b476b3996600b2c5acbf716645
Author: rbpotter <rbpotter@chromium.org>
Date: Tue Jul 03 01:21:31 2018

Print Preview: Disable cloud print when network service is enabled

Cloud print requests cannot be made from the Print Preview WebUI when
the network service is enabled. Avoid making these requests when the
flag is enabled, and add a (currently empty) CloudPrintHandler class
that implements the PrinterHandler interface, and will generate these
requests in future.

Bug: 829414,  848987 
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: Icec152b4687a325758a67fcf6562b913a8657073
Reviewed-on: https://chromium-review.googlesource.com/1120873
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572068}
[modify] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/resources/print_preview/data/destination_store.js
[modify] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/resources/print_preview/native_layer.js
[modify] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/ui/BUILD.gn
[add] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/ui/webui/print_preview/cloud_printer_handler.cc
[add] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/ui/webui/print_preview/cloud_printer_handler.h
[modify] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
[modify] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/ui/webui/print_preview/print_preview_handler.h
[modify] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
[modify] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/ui/webui/print_preview/printer_handler.cc
[modify] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/ui/webui/print_preview/printer_handler.h

Cc: -rbpotter@chromium.org
Owner: rbpotter@chromium.org
Status: Started (was: Available)
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9990eb4884bf57e3f907c5a475d182ff4db6d760

commit 9990eb4884bf57e3f907c5a475d182ff4db6d760
Author: rbpotter <rbpotter@chromium.org>
Date: Thu Jul 12 05:34:59 2018

Print Preview: Add new Cloud Printer Handler flag

Use a new cloud printer handler flag to control using the C++ cloud
printer handler instead of the JS cloud print interface in Print
Preview. Print Preview will be temporarily whitelisted to send network
requests with the network service flag enabled, so these changes should
be de-coupled from the network service flag.

Bug: 829414
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: I9a7b53fe69bfe5aad4ab7cc5688dfb88e6074014
Reviewed-on: https://chromium-review.googlesource.com/1134397
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574492}
[modify] https://crrev.com/9990eb4884bf57e3f907c5a475d182ff4db6d760/chrome/browser/about_flags.cc
[modify] https://crrev.com/9990eb4884bf57e3f907c5a475d182ff4db6d760/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/9990eb4884bf57e3f907c5a475d182ff4db6d760/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/9990eb4884bf57e3f907c5a475d182ff4db6d760/chrome/browser/resources/print_preview/data/destination_store.js
[modify] https://crrev.com/9990eb4884bf57e3f907c5a475d182ff4db6d760/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
[modify] https://crrev.com/9990eb4884bf57e3f907c5a475d182ff4db6d760/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
[modify] https://crrev.com/9990eb4884bf57e3f907c5a475d182ff4db6d760/chrome/common/chrome_features.cc
[modify] https://crrev.com/9990eb4884bf57e3f907c5a475d182ff4db6d760/chrome/common/chrome_features.h
[modify] https://crrev.com/9990eb4884bf57e3f907c5a475d182ff4db6d760/tools/metrics/histograms/enums.xml

Project Member

Comment 11 by bugdroid1@chromium.org, Oct 30

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/629e84f673918e29536410c9fbb6b59dab823dd3

commit 629e84f673918e29536410c9fbb6b59dab823dd3
Author: rbpotter <rbpotter@chromium.org>
Date: Tue Oct 30 21:49:05 2018

Print Preview: Rename Cloud Print Interface

This is the first step in adding a new cloud print interface, which will
communicate with the C++ CloudPrinterHandler.

Bug: 829414
Change-Id: I01c8cb25a7e42dae433833e6a6c0245ef6180626
Reviewed-on: https://chromium-review.googlesource.com/c/1308613
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604027}
[modify] https://crrev.com/629e84f673918e29536410c9fbb6b59dab823dd3/chrome/browser/resources/print_preview/BUILD.gn
[rename] https://crrev.com/629e84f673918e29536410c9fbb6b59dab823dd3/chrome/browser/resources/print_preview/cloud_print_interface_js.html
[rename] https://crrev.com/629e84f673918e29536410c9fbb6b59dab823dd3/chrome/browser/resources/print_preview/cloud_print_interface_js.js
[modify] https://crrev.com/629e84f673918e29536410c9fbb6b59dab823dd3/chrome/browser/resources/print_preview/data/BUILD.gn
[modify] https://crrev.com/629e84f673918e29536410c9fbb6b59dab823dd3/chrome/browser/resources/print_preview/data/destination_store.html
[modify] https://crrev.com/629e84f673918e29536410c9fbb6b59dab823dd3/chrome/browser/resources/print_preview/data/destination_store.js
[modify] https://crrev.com/629e84f673918e29536410c9fbb6b59dab823dd3/chrome/browser/resources/print_preview/data/invitation_store.html
[modify] https://crrev.com/629e84f673918e29536410c9fbb6b59dab823dd3/chrome/browser/resources/print_preview/data/invitation_store.js
[modify] https://crrev.com/629e84f673918e29536410c9fbb6b59dab823dd3/chrome/browser/resources/print_preview/new/BUILD.gn
[modify] https://crrev.com/629e84f673918e29536410c9fbb6b59dab823dd3/chrome/browser/resources/print_preview/new/app.html
[modify] https://crrev.com/629e84f673918e29536410c9fbb6b59dab823dd3/chrome/browser/resources/print_preview/new/app.js
[modify] https://crrev.com/629e84f673918e29536410c9fbb6b59dab823dd3/chrome/browser/resources/print_preview/print_preview.js
[modify] https://crrev.com/629e84f673918e29536410c9fbb6b59dab823dd3/chrome/browser/resources/print_preview/print_preview_resources.grd
[modify] https://crrev.com/629e84f673918e29536410c9fbb6b59dab823dd3/chrome/test/data/webui/print_preview/invalid_settings_browsertest.js
[modify] https://crrev.com/629e84f673918e29536410c9fbb6b59dab823dd3/chrome/test/data/webui/print_preview/print_preview_tests.js

Project Member

Comment 12 by bugdroid1@chromium.org, Nov 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7de4e051d07d725924f0637c4391e8924c57c531

commit 7de4e051d07d725924f0637c4391e8924c57c531
Author: rbpotter <rbpotter@chromium.org>
Date: Thu Nov 01 20:12:19 2018

Print Preview: Add cloud print interface class

Add a CloudPrintInterface interface base class and make
CloudPrintInterfaceJS and the CloudPrintInterfaceStub implement it.
This will allow adding a new type of cloud print interface later.

Bug: 829414
Change-Id: I274bb5e8aabf104eca8a1aac46b9dfd519ed467a
Reviewed-on: https://chromium-review.googlesource.com/c/1309223
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604688}
[modify] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/BUILD.gn
[add] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/cloud_print_interface.html
[add] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/cloud_print_interface.js
[modify] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/cloud_print_interface_js.html
[modify] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/cloud_print_interface_js.js
[add] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/cloud_print_interface_manager.html
[add] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/cloud_print_interface_manager.js
[modify] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/data/BUILD.gn
[modify] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/data/destination_store.html
[modify] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/data/destination_store.js
[modify] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/data/invitation_store.html
[modify] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/data/invitation_store.js
[modify] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/new/BUILD.gn
[modify] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/new/app.html
[modify] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/new/app.js
[modify] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/print_preview.js
[modify] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/browser/resources/print_preview/print_preview_resources.grd
[modify] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/test/data/webui/print_preview/cloud_print_interface_stub.js
[modify] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/test/data/webui/print_preview/invalid_settings_browsertest.js
[modify] https://crrev.com/7de4e051d07d725924f0637c4391e8924c57c531/chrome/test/data/webui/print_preview/print_preview_tests.js

Project Member

Comment 13 by bugdroid1@chromium.org, Nov 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c797118561b6de108bc5ad4fe342c2bef48046b0

commit c797118561b6de108bc5ad4fe342c2bef48046b0
Author: rbpotter <rbpotter@chromium.org>
Date: Fri Nov 02 03:00:00 2018

Print Preview: Add empty CloudPrintInterfaceNative

Bug: 829414
Change-Id: Ib6b84bcac405deda514b76c426b14f19888687a3
Reviewed-on: https://chromium-review.googlesource.com/c/1311655
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604824}
[modify] https://crrev.com/c797118561b6de108bc5ad4fe342c2bef48046b0/chrome/browser/resources/print_preview/BUILD.gn
[delete] https://crrev.com/70f76ac2064343d9bec7b5905e0859c321360dae/chrome/browser/resources/print_preview/cloud_print_interface_js.html
[modify] https://crrev.com/c797118561b6de108bc5ad4fe342c2bef48046b0/chrome/browser/resources/print_preview/cloud_print_interface_manager.html
[modify] https://crrev.com/c797118561b6de108bc5ad4fe342c2bef48046b0/chrome/browser/resources/print_preview/cloud_print_interface_manager.js
[add] https://crrev.com/c797118561b6de108bc5ad4fe342c2bef48046b0/chrome/browser/resources/print_preview/cloud_print_interface_native.js
[modify] https://crrev.com/c797118561b6de108bc5ad4fe342c2bef48046b0/chrome/browser/resources/print_preview/print_preview.js
[modify] https://crrev.com/c797118561b6de108bc5ad4fe342c2bef48046b0/chrome/browser/resources/print_preview/print_preview_resources.grd

Sign in to add a comment