Commit a783ac29 authored by Alexei Svitkine's avatar Alexei Svitkine Committed by Commit Bot

Switch UMA hw class to new API & update variations proto comments.

The old UMA hw class API is kept behind a base::Feature in case
we need to revert.

Also updates some comments where we were using ChromeOS instead
of Chrome OS, which is preferred.

Bug: 810872
Change-Id: I6ca101432da58ca36ec0d4a85cca745e7700257b
Reviewed-on: https://chromium-review.googlesource.com/978518Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
Commit-Queue: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546150}
parent 1de248a8
...@@ -84,7 +84,7 @@ void IncrementPrefValue(const char* path) { ...@@ -84,7 +84,7 @@ void IncrementPrefValue(const char* path) {
} }
const base::Feature kUmaShortHWClass{"UmaShortHWClass", const base::Feature kUmaShortHWClass{"UmaShortHWClass",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
// Called on a background thread to load hardware class information. // Called on a background thread to load hardware class information.
std::string GetHardwareClassOnBackgroundThread() { std::string GetHardwareClassOnBackgroundThread() {
......
...@@ -194,13 +194,13 @@ message Study { ...@@ -194,13 +194,13 @@ message Study {
// Possible form factors Chrome is running on. // Possible form factors Chrome is running on.
enum FormFactor { enum FormFactor {
// Chrome Desktop on Windows, Mac, Linux, or ChromeOS. // Chrome Desktop on Windows, Mac, Linux, or Chrome OS.
DESKTOP = 0; DESKTOP = 0;
// Phone-based mobile Chrome, e.g. an Android phone or iPhone. // Phone-based mobile Chrome, e.g. an Android phone or iPhone.
PHONE = 1; PHONE = 1;
// Tablet-based mobile Chrome, e.g. an Android tablet or iPad. // Tablet-based mobile Chrome, e.g. an Android tablet or iPad.
TABLET = 2; TABLET = 2;
// ChromeOS running in single-app Kiosk mode. // Chrome OS running in single-app Kiosk mode.
KIOSK = 3; KIOSK = 3;
} }
...@@ -271,22 +271,35 @@ message Study { ...@@ -271,22 +271,35 @@ message Study {
// Takes the same range of values as form_factor, e.g. [PHONE, TABLET]. // Takes the same range of values as form_factor, e.g. [PHONE, TABLET].
repeated FormFactor exclude_form_factor = 14; repeated FormFactor exclude_form_factor = 14;
// List of ChromeOS hardware classes that will receive this study. Each // List of Chrome OS hardware classes that will receive this study.
// entry is treated as a substring of the actual device hardware_class, //
// so "FOO" will match the client's hardware class "Device FOOBAR". If // Starting with Chrome M67, this does a case insensitive match on the same
// omitted, the study applies to all hardware classes unless // hardware class field that is reported to UMA in the SystemProfileProto's
// |hardware.hardware_class| field.
//
// Older versions did a case sensitive substring comparison, which was
// problematic for short hardware classes like "eve" that existed as
// substrings of other longer ones.
//
// If omitted, the study applies to all hardware classes unless
// |exclude_hardware_class| is specified. Mutually exclusive with // |exclude_hardware_class| is specified. Mutually exclusive with
// |exclude_hardware_class|. // |exclude_hardware_class|.
// An example might be "lumpy", "daisy", etc. // Ex: ["veyron_minnie", "daisy"]
repeated string hardware_class = 8; repeated string hardware_class = 8;
// List of ChromeOS hardware classes that will be excluded in this // List of Chrome OS hardware classes that will be excluded in this study.
// study. Each entry is treated as a substring of the actual device //
// hardware_class, so "FOO" will match the client's hardware class // Starting with Chrome M67, this does a case insensitive match on the same
// "Device FOOBAR". If omitted, the study applies to all hardware classes // hardware class field that is reported to UMA in the SystemProfileProto's
// unless |hardware_class| is specified. Mutually exclusive with // |hardware.hardware_class| field.
// |hardware_class|. //
// An example might be "lumpy", "daisy", etc. // Older versions did a case sensitive substring comparison, which was
// problematic for short hardware classes like "eve" that existed as
// substrings of other longer ones.
//
// If omitted, the study applies to all hardware classes unless
// |hardware_class| is specified. Mutually exclusive with |hardware_class|.
// Ex: ["veyron_minnie", "daisy"]
repeated string exclude_hardware_class = 9; repeated string exclude_hardware_class = 9;
// List of lowercase ISO 3166-1 alpha-2 country codes that will receive this // List of lowercase ISO 3166-1 alpha-2 country codes that will receive this
......
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