Rewrite GetPrimaryMainFrame comparison in terms of IsInPrimaryMainFrame (6/n)

This CL replaces the GetPrimaryMainFrame() comparison check in favor
of a more concise method IsInPrimaryMainFrame() in
webui_load_timer.cc.

Bug: 1268893
Change-Id: I5127aa919648cd48b63184c88332f76ca317f906
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4027863
Reviewed-by: John Lee <johntlee@chromium.org>
Commit-Queue: Antia Puentes <apuentes@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1072980}
diff --git a/chrome/browser/ui/webui/webui_load_timer.cc b/chrome/browser/ui/webui/webui_load_timer.cc
index ac4f9f2..4099daa 100644
--- a/chrome/browser/ui/webui/webui_load_timer.cc
+++ b/chrome/browser/ui/webui/webui_load_timer.cc
@@ -49,7 +49,7 @@
 void WebuiLoadTimer::DOMContentLoaded(
     content::RenderFrameHost* render_frame_host) {
   // See comment in DocumentOnLoadCompletedInPrimaryMainFrame.
-  if (!timer_ || render_frame_host != web_contents()->GetPrimaryMainFrame())
+  if (!timer_ || !render_frame_host->IsInPrimaryMainFrame())
     return;
   CallUmaHistogramTimes(document_initial_load_uma_id_, timer_->Elapsed());
 }