0

Roll upstream metrics proto changes

Proto changes were created with the proto_export command to keep the
system protos in sync with its G3 counterparts.

This was primarily motivated by finishing the deprecation of the
extensions SystemIndicator code by marking ActionType.SYSTEM_INDICATOR
as deprecated. However since there have been a number of updates on the
G3 proto side since the last roll, a number of other changes also came
across.

Note: there is also a followup in crrev.com/c/6196456 to utilize the new
extension_install.proto values in
chrome/browser/metrics/extensions_metrics_provider.cc

Bug: 389978739
Change-Id: I84b03f112e216328b062e87aa85c31b958c1b18e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6191272
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Commit-Queue: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1411895}
This commit is contained in:
Tim Judkins
2025-01-27 14:10:40 -08:00
committed by Chromium LUCI CQ
parent 8487839320
commit 1d49439bf5
6 changed files with 175 additions and 15 deletions

@ -1,9 +1,9 @@
Name: Metrics Protos
Short Name: metrics_proto
URL: This is the canonical public repository
Version: 718771138
Date: 2025-01-23
License: BSD
Version: 720227175
Date: 2025-01-27
License: BSD-3-Clause
License File: LICENSE
Shipped: yes
Security Critical: Yes

@ -47,6 +47,7 @@ message CoarseSystemInfo {
CHANNEL_STABLE = 1;
CHANNEL_NOT_STABLE = 2;
}
optional Channel channel = 1;
// Platform and activity type, 4 bits allocated.
@ -67,6 +68,7 @@ message CoarseSystemInfo {
PLATFORM_CHROMEOS = 11;
PLATFORM_ANDROID = 12;
}
optional Platform platform = 2;
// Geo designation, 1 bit allocated.
@ -77,6 +79,7 @@ message CoarseSystemInfo {
GEO_DESIGNATION_EEA = 1; // Countries under the European Economic Area.
GEO_DESIGNATION_ROW = 2; // Rest of the world.
}
optional GeoDesignation geo_designation = 3;
// An indicator of whether this is a recent (week old) client install or
@ -92,6 +95,7 @@ message CoarseSystemInfo {
CLIENT_AGE_RECENT = 1;
CLIENT_AGE_NOT_RECENT = 2;
}
optional ClientAge client_age = 4;
// First 3 digits of the milestone mod (%) 16, 4 bits allocated.
@ -116,12 +120,15 @@ message EncryptedPageLoadEvents {
message EncryptedDeidentifiedWebAnalyticsEvent {
optional bytes encrypted_event = 1;
optional fixed64 field_trials_hash = 2;
// Same as DeidentifiedWebAnalyticsEvent.event_hash.
optional fixed64 event_hash = 3;
}
repeated EncryptedDeidentifiedWebAnalyticsEvent
encrypted_deidentified_web_analytics_events = 1;
}
repeated EncryptedPageLoadEvent encrypted_page_load_events = 1;
}
@ -141,6 +148,7 @@ message DeidentifiedWebAnalyticsEvent {
// The content is a URL.
CONTENT_TYPE_URL = 1;
}
optional ContentType content_type = 1;
// A hash of the content (e.g. hash("example.com")).
@ -164,6 +172,7 @@ message DeidentifiedWebAnalyticsEvent {
// Metrics associated with the content.
repeated EntryMetrics metrics = 3;
}
repeated ContentMetric content_metrics = 2;
// Field trials that we want to associate with this event, name id and

@ -64,9 +64,17 @@ message ExtensionInstallProto {
// one type of action.
enum ActionType {
NO_ACTION = 0;
BROWSER_ACTION = 1;
PAGE_ACTION = 2;
SYSTEM_INDICATOR = 3;
// Deprecated, this API was removed in M134.
SYSTEM_INDICATOR = 3 [deprecated = true];
// In manifest version 3, PAGE_ACTION and BROWSER_ACTION are replaced with a
// single ACTION type.
ACTION = 4;
}
optional ActionType action_type = 4;
@ -171,6 +179,12 @@ message ExtensionInstallProto {
// example, an unpacked extension) while the developer mode in
// chrome://extensions is OFF.
UNSUPPORTED_DEVELOPER_EXTENSION = 21;
// Disabled because of an unknown reason. This can happen when newer
// versions of the browser sync reasons which are not known to the current
// version. We never actually write this to prefs. This is used to indicate
// (at runtime) that unknown reasons are present in the prefs.
UNKNOWN = 22;
}
// Any DisableReasons in effect for the extension. An empty list means the

@ -22,37 +22,46 @@ message OmniboxScoringSignals {
// a time-decaying factor with a 30-day half-life based on the last visit
// timestamp.
optional int32 typed_count = 1;
// Number of times the URL was visited in general for this profile on this
// device. Note that this will soon be across syncing devices with the
// rollout of full history sync in 2023. Only include visits from the last
// 90 days. Discounted by a time-decaying factor with a 30-day half-life
// based on the last visit timestamp.
optional int32 visit_count = 2;
// Elapsed time since last visit for this profile on this device. Uses the
// local client-side timestamps. Can be unreliable as local times can
// change in between different runs of Chrome.
optional int64 elapsed_time_last_visit_secs = 3;
// Number of times the suggestion was visited with the current input or
// prefix of it for this profile on this device.
// Discounted by a time-decaying factor with a 1-week half-life based on
// the last visit timestamp.
optional int32 shortcut_visit_count = 4;
// Length of the shortest shortcut text.
// Useful in comparison with |typed_length|.
optional int32 shortest_shortcut_len = 5;
// Elapsed time since last shortcut visit for this profile on this device.
// Uses the local client-side timestamps. Can be unreliable as local times
// can change in between different runs of Chrome.
optional int64 elapsed_time_last_shortcut_visit_sec = 6;
// URL points to the root page of a website, i.e., no query, path words,
// or references after "/".
optional bool is_host_only = 7;
// Number of bookmarks for this profile with this URL.
optional int32 num_bookmarks_of_url = 8;
// Position of the first matched bookmark title term.
// E.g. 4 for input 'x' and title "0123x56".
// Not set when there is no match in the bookmark title.
optional int32 first_bookmark_title_match_position = 9;
// Total length of matched strings in the bookmark title. Can be larger
// than the input text length. The input text is split by whitespaces, and
// each input word is matched against the title separately. Their matching
@ -60,60 +69,74 @@ message OmniboxScoringSignals {
// E.g. 9 for input "[abc] ijk [xyz]" and title "[abc] def [xyz] - [xyz]".
// Set to 0 when there is no match in the title.
optional int32 total_bookmark_title_match_length = 10;
// Number of input terms matched by bookmark title. Take the maximum when
// there are multiple matching bookmarks of this URL.
// E.g., 1 for input "[a] b" and bookmark title "[a] book title".
// Not set when the user does not have this URL bookmarked.
optional int32 num_input_terms_matched_by_bookmark_title = 11;
// Position of the first matched URL substring.
// URL scheme or TLD matches are excluded, though those characters are
// counted when assessing match position. E.g., 11 for 't' in
// "https://hos[t].com" Not set when there is no URL match.
optional int32 first_url_match_position = 12;
// Total length of the matched URL strings. Can be longer than the input
// string. E.g., Given input "ab abc" and url "abc.com/ab", total is 7 (4
// for "ab" in "[ab]c.com/[ab]" and 3 for "abc" in
// "[abc].com"). Set to 0 when there is no URL string match.
optional int32 total_url_match_length = 13;
// One word matches host at a word boundary. E.g., true for input "[h] a"
// and "[h].com", Set to false when there are matches in the host but none
// at word boundaries. E.g., false for input "a" and "h[a].com". Not set
// when there is no host match.
optional bool host_match_at_word_boundary = 14;
// Total length of the matched host substrings.
// Can be larger than the input text.
// E.g., 3 for input "h a" and "[h]ost[aa].com".
// Set to 0 when there is no host match.
optional int32 total_host_match_length = 15;
// Total length of the matched substrings in the path at word boundaries.
// Can be larger than the input text. E.g. 3 for 'p' in
// 'a.com/[p]ath_[p]ath/[p]ath'. Set to 0 when there are no such matches.
optional int32 total_path_match_length = 16;
// Total length of the matched substrings in the query_or_ref at word
// boundaries. Can be larger than the input text.
// E.g., 3 for input '[qu] [a]' and 'a.com/a?[qu]ery_[a]'.
// Set to 0 when there are no such matches.
optional int32 total_query_or_ref_match_length = 17;
// Total length of the matched substrings in the page title at word
// boundaries. Can be larger than the input text.
// E.g., 2 for input "[a] [t] x" and page title "[a]bc [t]itle".
// Set to 0 when there is no title match.
optional int32 total_title_match_length = 18;
// Has matches that are not in schemes (e.g., "https") or "www".
optional bool has_non_scheme_www_match = 19;
// Number of input terms matched by title.
// E.g., 1 for input "[a] b" and title "[a] title [a]".
// Useful in comparison with |num_typed_terms|.
optional int32 num_input_terms_matched_by_title = 20;
// Number of input terms matched by url.
// Useful in comparison with |num_typed_terms|.
// E.g., 1 for input "[a] b" and url "[a].com".
optional int32 num_input_terms_matched_by_url = 21;
// Length of url. E.g., 22 for "https://www.host.com/p".
optional int32 length_of_url = 22;
// Site engagement score for the site the URL is on. See
// https://www.chromium.org/developers/design-documents/site-engagement/
optional float site_engagement = 23;
// True if url can be default match.
// Currently, this requires single-term input, and match needs to begin
// immediately after '', scheme, or 'http://www' in the URL, e.g., given
@ -121,6 +144,7 @@ message OmniboxScoringSignals {
// "host[w].com". ref:
// https://source.chromium.org/chromium/chromium/src/+/main:components/omnibox/browser/scored_history_match.cc;l=187?q=inline%20autocomplete
optional bool allowed_to_be_default_match = 24;
// Server-generated relevance score provided by the remote Suggest service
// for this suggestion.
// This signal contains the raw score received from the Suggest service
@ -132,6 +156,7 @@ message OmniboxScoringSignals {
// OR non-Search suggestion (obtained from any source)
// - Unset: Otherwise (due to unexpected client-side behavior)
optional int32 search_suggest_relevance = 25;
// Whether this particular Search suggestion (or one of the duplicates deduped
// under it) refers to an entity.
// As such, this signal will take on the following values:
@ -140,6 +165,7 @@ message OmniboxScoringSignals {
// entity
// - Unset: Otherwise (due to unexpected client-side behavior)
optional bool is_search_suggest_entity = 26;
// Whether this suggestion (or one of the duplicates deduped under it) is a
// verbatim match with respect to the user's input (e.g. URL_WHAT_YOU_TYPED).
// As such, this signal will take on the following values:
@ -149,6 +175,7 @@ message OmniboxScoringSignals {
// match
// - Unset: Otherwise (due to unexpected client-side behavior)
optional bool is_verbatim = 27;
// Whether this suggestion (or one of the duplicates deduped under it) is a
// NAVSUGGEST match.
// As such, this signal will take on the following values:
@ -157,6 +184,7 @@ message OmniboxScoringSignals {
// NAVSUGGEST match
// - Unset: Otherwise (due to unexpected client-side behavior)
optional bool is_navsuggest = 28;
// Whether this suggestion (or one of the duplicates deduped under it) is a
// SEARCH_SUGGEST_TAIL match.
// As such, this signal will take on the following values:
@ -166,6 +194,7 @@ message OmniboxScoringSignals {
// SEARCH_SUGGEST_TAIL match
// - Unset: Otherwise (due to unexpected client-side behavior)
optional bool is_search_suggest_tail = 29;
// Whether this suggestion (or one of the duplicates deduped under it)
// contains an answer with respect to the user's input (i.e.
// `match.answer_type` != UNSPECIFIED in the client code).
@ -175,6 +204,7 @@ message OmniboxScoringSignals {
// answer
// - Unset: Otherwise (due to unexpected client-side behavior)
optional bool is_answer_suggest = 30;
// Whether this suggestion (or one of the duplicates deduped under it) is a
// CALCULATOR match.
// As such, this signal will take on the following values:

@ -13,7 +13,7 @@ package metrics;
// Stores information about a printer that a user is setting up/has attempted to
// set up.
// Next tag: 9
// Next tag: 21
message PrinterEventProto {
// The detected printer manufacuter name.
optional string usb_printer_manufacturer = 1;
@ -60,4 +60,104 @@ message PrinterEventProto {
// The event for which this was recorded.
optional EventType event_type = 8;
// List of document formats the printer supports. MIME-types.
repeated string document_format_supported = 9;
// The printer's document-format-preferred attribute. MIME-type.
optional string document_format_preferred = 10;
// Document format used when the user does not supply a document-format
// attribute. MIME-type.
optional string document_format_default = 11;
// Supported printing modes for URF printing.
repeated string urf_supported = 12;
// PDF versions which printers can support. See
// https://ftp.pwg.org/pub/pwg/candidates/cs-ippnodriver20-20230301-5100.13.pdf
// for details.
// Next tag: 20
enum PdfVersion {
PDF_VERSION_UNKNOWN = 0;
ADOBE_1_3 = 1;
ADOBE_1_4 = 2;
ADOBE_1_5 = 3;
ADOBE_1_6 = 4;
ADOBE_1_7 = 5;
ISO_15930_1_2001 = 6;
ISO_15930_3_2002 = 7;
ISO_15930_4_2003 = 8;
ISO_15930_6_2003 = 9;
ISO_15930_7_2010 = 10;
ISO_15930_8_2010 = 11;
ISO_16612_2_2010 = 12;
ISO_19005_1_2005 = 13;
ISO_19005_2_2011 = 14;
ISO_19005_3_2012 = 15;
ISO_23504_1_2020 = 16;
ISO_32000_1_2008 = 17;
ISO_32000_2_2017 = 18;
PWG_5102_3 = 19;
}
// PDF versions supported by the printer.
repeated PdfVersion pdf_versions_supported = 13;
// IPP extension features printers can support. See
// https://ftp.pwg.org/pub/pwg/candidates/cs-ippnodriver20-20230301-5100.13.pdf
// for details.
// Next tag: 29
enum IppFeature {
IPP_FEATURE_UNKNOWN = 0;
ADF = 1;
FILM_READER = 2;
PLATEN = 3;
DOCUMENT_OBJECT = 4;
FAXOUT = 5;
ICC_COLOR_MATCHING = 6;
INFRASTRUCTURE_PRINTER = 7;
IPP_3D = 8;
IPP_EVERYWHERE = 9;
IPP_EVERYWHERE_SERVER = 10;
JOB_RELEASE = 11;
JOB_SAVE = 12;
JOB_STORAGE = 13;
NONE = 14;
PAGE_OVERRIDES = 15;
PRINT_POLICY = 16;
PRODUCTION = 17;
PROOF_AND_SUSPEND = 18;
PROOF_PRINT = 19;
RESOURCE_OBJECT = 20;
SCAN = 21;
SUBSCRIPTION_OBJECT = 22;
SYSTEM_OBJECT = 23;
WFDS_PRINT_1_0 = 24;
AIRPRINT_1_6 = 25;
AIRPRINT_1_7 = 26;
AIRPRINT_1_8 = 27;
AIRPRINT_2_1 = 28;
}
// List of IPP extension features supported by the printer.
repeated IppFeature ipp_features_supported = 14;
// Mopria certification level of the printer.
optional string mopria_certified = 15;
// Categories of printing supported by the printer.
repeated string printer_kind = 16;
// Whether or not the printer supports roll sizes.
optional bool roll_sizes_available = 17;
// The name of the PPD file that was used to set up the printer.
optional string ppd_file_name = 18;
// All of the CUPS filters used by the printer.
repeated string cups_filters = 19;
// IEEE 1284 Device ID string.
optional string device_id = 20;
}

@ -741,19 +741,26 @@ message SystemProfileProto {
// (or foreground) action at any point during the two records.
//
// Note: This field is only set on mobile platforms (Android, WebView, iOS).
// Backgrounding/foregrounding also includes hiding/displaying an embedded
// WebView within a hosting app.
// Some caveats:
// - Backgrounding/foregrounding also includes hiding/displaying an embedded
// WebView within a hosting app.
// - On Android, it's possible for Chrome to be launched and warmed up in the
// background, e.g. by CCT. Metrics accumulated while in this state may
// possibly be included in the same `fg_bg_id` as the first foreground
// "period" from when the user eventually launches a CCT (or Chrome). This
// is the only case where a given `fg_bg_id` will contain both foreground
// and background metrics.
//
// WARNING: This field may be unset in certain edge cases where the continuity
// of a foreground/background "session" could not be properly determined. I.e.
// of a foreground/background "period" could not be properly determined. I.e.
// it is possible for a log to contain metrics from both a foreground and
// background period, and the `fg_bg_id` field will be unset in this case.
// These edge cases are a lot more common than one may think, so please
// contact chrome-metrics-team@ before using this field for analysis. Some
// known edge cases include:
// - The first log (first ~15 seconds of the process), because it cannot be
// closed early, and there is always a foreground notification on startup.
// - Going from background to foreground on WebView and iOS.
// background period -- the `fg_bg_id` field will be unset in this case (the
// only exception being CCT warm-ups described above). These edge cases can
// happen quite easily, so please contact chrome-metrics-team@ before using
// this field for analysis. Some known edge cases include:
// - The user backgrounding/foregrounding the app during the first log (first
// ~15 seconds of the process), because it cannot be closed early.
// - Going from background to foreground on WebView or iOS.
// - Initial stability logs.
// - Independent logs from PMA files.
//