Commit 4d24a607 authored by Alan Screen's avatar Alan Screen Committed by Commit Bot

Add metric to detect support for OpenXPS

Windows printing path is being modernized from using the pre-WinXP
GDI print API to an XPS-based API.  This was first introduced
Windows 7 and was deprecated in favor of OpenXPS in Windows 8 and
beyond.  Some Windows 7 installations may be capable of OpenXPS if
they have been sufficiently patched [1].

Determining the number of Windows 7 machines which would still require
XPS instead of OpenXPS can provide guidance if it is worth the effort
to implement support for both.

[1] https://docs.microsoft.com/en-us/windows/win32/printdocs/app-support-for-openxps-printing#sending-xps-data-to-the-print-system

Bug: 1008222
Change-Id: Id528478fe4f90002aba09208cf34d74cfe787472
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1826278Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702677}
parent 4d73bae7
......@@ -66,6 +66,7 @@
#include "base/win/windows_version.h"
#include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
#include "chrome/browser/shell_integration_win.h"
#include "printing/backend/win_helper.h"
#endif // defined(OS_WIN)
namespace {
......@@ -226,6 +227,10 @@ void RecordStartupMetrics() {
UMA_HISTOGRAM_BOOLEAN("Windows.HasHighResolutionTimeTicks",
base::TimeTicks::IsHighResolution());
// Metric of interest specifically for Windows 7 printing.
UMA_HISTOGRAM_BOOLEAN("Windows.HasOpenXpsSupport",
printing::XPSModule::IsOpenXpsCapable());
#endif // defined(OS_WIN)
bluetooth_utility::ReportBluetoothAvailability();
......
......@@ -162280,6 +162280,16 @@ regressions. -->
</summary>
</histogram>
<histogram name="Windows.HasOpenXpsSupport" enum="Boolean"
expires_after="2020-04-01">
<owner>awscreen@chromium.org</owner>
<owner>thestig@chromium.org</owner>
<summary>
If the version of Xpsprint.dll is sufficiently modern to support OpenXPS.
Reported once per browser session, on startup.
</summary>
</histogram>
<histogram name="Windows.HighResolutionTimerUsage" units="%"
expires_after="M81">
<owner>stanisc@chromium.org</owner>
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