New issue
Advanced search Search tips

Issue 841027 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Task

Blocking:
issue 678288



Sign in to add a comment

Only load WebView's metrics client ID in one place

Project Member Reported by paulmiller@chromium.org, May 8 2018

Issue description

AwMetricsServiceClient::LoadOrCreateClientId() loads the client ID for metrics.

Variations also uses the client ID, to seed its EntropyProvider. Since adding variations, we also "pre-load" the client ID in AwMetricsServiceClient.preloadClientId. This happens before native initialization. If successful, LoadOrCreateClientId uses the pre-loaded value.

We're keeping the loading code in both places for now, but if we decide we're happy with the variations implementation, we should unify them.

This will require either porting base::IsValidGUID to Java or moving the load to somewhere in native before the client ID is needed by AwFieldTrialCreator.
 
https://chromium-review.googlesource.com/c/chromium/src/+/1227531/1/android_webview/browser/aw_metrics_service_client.cc#160

I've added DCHECKs to protect WebView from MetricsStateManager::ForceClientIdCreation(). Those should be removed in cleanup.

Sign in to add a comment