0
Go to file
Alan Screen 301d80b65b Use faster method to EnumeratePrinters on Windows
On Windows, the set of Print Spooler API calls used to get the list of
installed printers can require opening a connection to each printer.
This might potentially block waiting on network connections to remote
printers.  Such delays can result in the EnumeratePrinters() call
taking a long time, making the Print Preview UI unresponsive.

There is a slightly different way to use the Print Spooler API that
does not block on network connections.  However, it does not return all
of the information of interest for Print Preview.  In particular, it is
missing the location metadata.

The location metadata can be found in the Windows registry for a
printer driver.  Since reading from the Windows registry also does not
block on network connections, using a combination of the two provides a
way to more quickly return all the same information as the prior Print
Spooler-only method.  Since the location metadata is relatively minor
(only shows up in the dialog to select a destination), using the
registry in this way is a relatively low-risk way to speed up the
enumeration, since all the other information is still acquired using
the Print Spooler API.

Introduce the ability to use a mixed method of using the registry to
supplement the faster Printer Spooler API method.  Make this approach
the default, but guard it behind a feature flag so that it can be
disabled with an emergency kill switch if necessary.

Given that this is a change to the low-level interaction with the
operating system, introduce a manual unit test to validate the new
method.

Also update the printing_features files to concatenate the nested
namespaces.

Bug: 374128404
Change-Id: Icc48e928dd484b916b2d5a130c39f5dc313ee35a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6220277
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Alan Screen <awscreen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1427285}
2025-03-03 11:24:37 -08:00
2025-03-03 06:52:16 -08:00
2025-03-03 11:07:35 -08:00
2025-02-24 12:44:08 -08:00
2025-03-03 10:55:42 -08:00
2025-02-25 08:53:07 -08:00
2025-03-03 11:05:23 -08:00

Logo Chromium

Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.

The project's web site is https://www.chromium.org.

To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.

Documentation in the source is rooted in docs/README.md.

Learn how to Get Around the Chromium Source Code Directory Structure.

For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.

If you found a bug, please file it at https://crbug.com/new.

Description
Chromium是一个开源浏览器项目,提供了一种安全、快速、稳定的方法来体验Web。该浏览器可以在多个平台上下载,包括Mac、Windows、Linux和ChromiumOS。项目原始地址: https://chromium.googlesource.com/chromium/src.git
https://www.mobibrw.com/gitea-mirrors/chromium/src.git
Readme BSD-3-Clause 89 GiB
Languages
C++ 74.4%
Java 8.2%
Objective-C++ 4.6%
TypeScript 4%
Python 2.5%
Other 6.1%