Commit 61d240cf authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

AW UMA: clarify the GetAppPackageName() method

No change to logic, only docs. This clarifies that embedders may return
the empty string from GetAppPackageName() for privacy concerns
(previously this was not documented as a supported case).

This removes embedder-specific terminology from the metrics component,
and clarifies WebView's behavior in its method override.

Bug: 969803
Test: N/A
Change-Id: Idb57e4de11cc8c40b58f95a012a5110ba9bdf8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1897012Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712688}
parent 0c1e4aa5
......@@ -127,6 +127,9 @@ class AwMetricsServiceClient : public metrics::MetricsServiceClient,
override;
base::TimeDelta GetStandardUploadInterval() override;
bool ShouldStartUpFastForTesting() const override;
// Gets the embedding app's package name if it's OK to log. Otherwise, this
// returns the empty string.
std::string GetAppPackageName() override;
protected:
......
......@@ -142,8 +142,11 @@ class MetricsServiceClient {
// Returns whether UKM notification listeners were attached to all profiles.
virtual bool AreNotificationListenersEnabledOnAllProfiles();
// Gets Chrome's package name in Android Chrome, or the host app's package
// name in Android WebView, or an empty string on other platforms.
// Gets the app package name (as defined by the embedder). Since package name
// is only meaningful for Android, other platforms should return the empty
// string (this is the same as the default behavior). If the package name
// should not be logged for privacy/fingerprintability reasons, the embedder
// should return the empty string.
virtual std::string GetAppPackageName();
// Gets the key used to sign metrics uploads. This will be used to compute an
......
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