Implement codepaths to add full_hardware_class proto field.
Launch covers client side changes needed to add full hardware class
to ChromeSync, in an effort to improve the accuracy of stored device
models.
By tracking the full hardware class of a device, more accurate chromeos device
segmentation of DAU can be accomplished. This can be used
to determine information about how hardware components of a device
relate to usage patterns, or issues commonly occurring across them.
Added unittests to validate correctness.
Bug: 1188978
Change-Id: Ie33b5737ebf5f53e5ba54db2ee85887dcb2c7046
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2800501
Auto-Submit: Hirthanan Subenderan <[email protected]>
Commit-Queue: Hirthanan Subenderan <[email protected]>
Commit-Queue: Richard Knoll <[email protected]>
Reviewed-by: Richard Knoll <[email protected]>
Reviewed-by: Rushan Suleymanov <[email protected]>
Reviewed-by: Travis Skare <[email protected]>
Reviewed-by: Ben Wells <[email protected]>
Cr-Commit-Position: refs/heads/master@{#873253}
diff --git a/components/sync_device_info/device_info.h b/components/sync_device_info/device_info.h
index 76a950ec..c16d57e 100644
--- a/components/sync_device_info/device_info.h
+++ b/components/sync_device_info/device_info.h
@@ -97,6 +97,7 @@
const std::string& signin_scoped_device_id,
const std::string& manufacturer_name,
const std::string& model_name,
+ const std::string& full_hardware_class,
base::Time last_updated_timestamp,
base::TimeDelta pulse_interval,
bool send_tab_to_self_receiving_enabled,
@@ -139,6 +140,11 @@
// The device model name.
const std::string& model_name() const;
+ // Returns unique hardware class string which details the
+ // HW combination of a ChromeOS device. Returns empty on other OS devices or
+ // when UMA is disabled.
+ const std::string& full_hardware_class() const;
+
// Returns the time at which this device was last updated to the sync servers.
base::Time last_updated_timestamp() const;
@@ -176,6 +182,8 @@
// be used for tracking.
void set_public_id(const std::string& id);
+ void set_full_hardware_class(const std::string& full_hardware_class);
+
void set_send_tab_to_self_receiving_enabled(bool new_value);
void set_sharing_info(const base::Optional<SharingInfo>& sharing_info);
@@ -215,6 +223,8 @@
const std::string model_name_;
+ std::string full_hardware_class_;
+
const base::Time last_updated_timestamp_;
const base::TimeDelta pulse_interval_;