Commit 0cfa7036 authored by Bartek Nowierski's avatar Bartek Nowierski Committed by Commit Bot

Avoid setting up binding & calling GetNavigationSourceId more than once.

Change-Id: If368dc7696a04992bac3a95489954f9e97435894

BUG: 1018156,1036721,1036720
Change-Id: If368dc7696a04992bac3a95489954f9e97435894
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1980665
Auto-Submit: Bartek Nowierski <bartekn@chromium.org>
Reviewed-by: default avatarYuta Kitamura <yutak@chromium.org>
Commit-Queue: Bartek Nowierski <bartekn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#727347}
parent 35282604
...@@ -4133,7 +4133,9 @@ bool Document::CheckCompletedInternal() { ...@@ -4133,7 +4133,9 @@ bool Document::CheckCompletedInternal() {
return false; return false;
} }
if (frame_ && frame_->Client()->GetRemoteNavigationAssociatedInterfaces()) { // !ukm_binding_ is checked to avoid repeating work.
if (frame_ && frame_->Client()->GetRemoteNavigationAssociatedInterfaces() &&
!ukm_binding_) {
ukm_binding_ = std::make_unique< ukm_binding_ = std::make_unique<
mojo::AssociatedRemote<mojom::blink::UkmSourceIdFrameHost>>(); mojo::AssociatedRemote<mojom::blink::UkmSourceIdFrameHost>>();
frame_->Client()->GetRemoteNavigationAssociatedInterfaces()->GetInterface( frame_->Client()->GetRemoteNavigationAssociatedInterfaces()->GetInterface(
......
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