We need an iOS equivalent of components/ukm/content/source_url_recorder.h, which handles recording URLs for NavigationHandle and getting SourceIds for WebContents objects.
We probably need something similar as a WebStateObserver, and some way of getting a SourceId for last document on WebState.
Just a note that the current (in progress) implementation doesn't assign navigation ids until commit. The change notes:
// TODO( crbug.com/792662 ): Assign these to navigations earlier and retrieve
// them here.
https://chromium-review.googlesource.com/c/chromium/src/+/877398
we should keep this bug open after that change lands, so we continue to track that issue (or open a new issue specific to it).
Comment 1 by holte@chromium.org
, Jan 20 2018Status: Started (was: Available)