Commit 8ba895f7 authored by Yuheng Huang's avatar Yuheng Huang Committed by Commit Bot

Tab Search: Add trace events to measure performance

Bug: 1099917
Change-Id: I1f2a25b7ffb96cd89fd5e316d15c332be5222a27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2406678Reviewed-by: default avatarJohn Lee <johntlee@chromium.org>
Commit-Queue: Yuheng Huang <yuhengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806360}
parent 34503306
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_functions.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "base/timer/timer.h" #include "base/timer/timer.h"
#include "base/trace_event/trace_event.h"
#include "chrome/browser/extensions/extension_tab_util.h" #include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/favicon/favicon_utils.h" #include "chrome/browser/favicon/favicon_utils.h"
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
...@@ -72,6 +73,7 @@ void TabSearchPageHandler::CloseTab(int32_t tab_id) { ...@@ -72,6 +73,7 @@ void TabSearchPageHandler::CloseTab(int32_t tab_id) {
} }
void TabSearchPageHandler::GetProfileTabs(GetProfileTabsCallback callback) { void TabSearchPageHandler::GetProfileTabs(GetProfileTabsCallback callback) {
TRACE_EVENT0("browser", "TabSearchPageHandler::GetProfileTabs");
auto profile_tabs = tab_search::mojom::ProfileTabs::New(); auto profile_tabs = tab_search::mojom::ProfileTabs::New();
Profile* profile = browser_->profile(); Profile* profile = browser_->profile();
for (auto* browser : *BrowserList::GetInstance()) { for (auto* browser : *BrowserList::GetInstance()) {
...@@ -207,6 +209,7 @@ void TabSearchPageHandler::TabChangedAt(content::WebContents* contents, ...@@ -207,6 +209,7 @@ void TabSearchPageHandler::TabChangedAt(content::WebContents* contents,
Browser* browser = chrome::FindBrowserWithWebContents(contents); Browser* browser = chrome::FindBrowserWithWebContents(contents);
if (!browser) if (!browser)
return; return;
TRACE_EVENT0("browser", "TabSearchPageHandler::TabChangedAt");
page_->TabUpdated(GetTabData(browser->tab_strip_model(), contents, index)); page_->TabUpdated(GetTabData(browser->tab_strip_model(), contents, index));
} }
......
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