Commit 2baca567 authored by Caroline Rising's avatar Caroline Rising Committed by Chromium LUCI CQ

Read later: add WebuiLoadTimer metrics.

Bug: 1163938
Change-Id: I03c223c41de3196be12d9d4283087dfa04ec38e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2621676Reviewed-by: default avatarConnie Wan <connily@chromium.org>
Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
Commit-Queue: Caroline Rising <corising@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842384}
parent d908e414
...@@ -34,7 +34,10 @@ void AddLocalizedString(content::WebUIDataSource* source, ...@@ -34,7 +34,10 @@ void AddLocalizedString(content::WebUIDataSource* source,
} // namespace } // namespace
ReadLaterUI::ReadLaterUI(content::WebUI* web_ui) ReadLaterUI::ReadLaterUI(content::WebUI* web_ui)
: ui::MojoBubbleWebUIController(web_ui) { : ui::MojoBubbleWebUIController(web_ui),
webui_load_timer_(web_ui->GetWebContents(),
"ReadingList.WebUI.LoadDocumentTime",
"ReadingList.WebUI.LoadCompletedTime") {
content::WebUIDataSource* source = content::WebUIDataSource* source =
content::WebUIDataSource::Create(chrome::kChromeUIReadLaterHost); content::WebUIDataSource::Create(chrome::kChromeUIReadLaterHost);
static constexpr webui::LocalizedString kLocalizedStrings[] = { static constexpr webui::LocalizedString kLocalizedStrings[] = {
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "base/macros.h" #include "base/macros.h"
#include "chrome/browser/ui/webui/read_later/read_later.mojom.h" #include "chrome/browser/ui/webui/read_later/read_later.mojom.h"
#include "chrome/browser/ui/webui/webui_load_timer.h"
#include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/receiver.h"
...@@ -40,6 +41,8 @@ class ReadLaterUI : public ui::MojoBubbleWebUIController, ...@@ -40,6 +41,8 @@ class ReadLaterUI : public ui::MojoBubbleWebUIController,
mojo::Receiver<read_later::mojom::PageHandlerFactory> page_factory_receiver_{ mojo::Receiver<read_later::mojom::PageHandlerFactory> page_factory_receiver_{
this}; this};
WebuiLoadTimer webui_load_timer_;
WEB_UI_CONTROLLER_TYPE_DECL(); WEB_UI_CONTROLLER_TYPE_DECL();
}; };
......
...@@ -12676,6 +12676,27 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. ...@@ -12676,6 +12676,27 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
<summary>Number of unread entries in reading list.</summary> <summary>Number of unread entries in reading list.</summary>
</histogram> </histogram>
<histogram name="ReadingList.WebUI.LoadCompletedTime" units="ms"
expires_after="M92">
<owner>corising@chromium.org</owner>
<owner>chrome-desktop-ui-sea@google.com</owner>
<summary>
The amount of time between the render frame host StartProvisionalLoad event
and the render frame DocumentOnLoadCompleted event for the Read Later WebUI
page.
</summary>
</histogram>
<histogram name="ReadingList.WebUI.LoadDocumentTime" units="ms"
expires_after="M92">
<owner>corising@chromium.org</owner>
<owner>chrome-desktop-ui-sea@google.com</owner>
<summary>
The amount of time between the render frame host StartProvisionalLoad and
DidFinishDocumentLoad events for the Read Later WebUI page.
</summary>
</histogram>
<histogram name="RecoveryComponent.Event" enum="RecoveryComponentEvent" <histogram name="RecoveryComponent.Event" enum="RecoveryComponentEvent"
expires_after="M77"> expires_after="M77">
<owner>robertshield@chromium.org</owner> <owner>robertshield@chromium.org</owner>
......
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