Commit 9004be20 authored by ssid's avatar ssid Committed by Commit Bot

Add trace event to sync_sessions::OnReadAllMetadata()

It is likely a cause of janks on UI thread on Android.
Add a trace event to get metrics about the duration.

BUG=902203

Change-Id: I4c4e9c2a20790264b982007ea7ee88ddfa7b972c
Reviewed-on: https://chromium-review.googlesource.com/c/1319369Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
Commit-Queue: ssid <ssid@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606104}
parent ce6ad323
......@@ -16,6 +16,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/pickle.h"
#include "base/strings/stringprintf.h"
#include "base/trace_event/trace_event.h"
#include "components/sync/base/time.h"
#include "components/sync/device_info/device_info.h"
#include "components/sync/device_info/device_info_util.h"
......@@ -172,6 +173,8 @@ class FactoryImpl : public base::SupportsWeakPtr<FactoryImpl> {
std::unique_ptr<ModelTypeStore::RecordList> record_list,
const base::Optional<syncer::ModelError>& error,
std::unique_ptr<syncer::MetadataBatch> metadata_batch) {
// Remove after fixing https://crbug.com/902203.
TRACE_EVENT0("browser", "FactoryImpl::OnReadAllMetadata");
if (error) {
std::move(callback).Run(error, /*store=*/nullptr,
/*metadata_batch=*/nullptr);
......
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