Commit 72cc775a authored by Victor Hugo Vianna Silva's avatar Victor Hugo Vianna Silva Committed by Commit Bot

Add metrics to evaluate number of undecryptable sync entities

This CL adds a histogram that records, per data type, what was the
number of sync entities that remained undecrypted when it was disabled.

Bug: 1109221
Change-Id: I4b97f99286a85f3f5bd4f3ee4cf8de206ff93d69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2326710
Commit-Queue: Victor Vianna <victorvianna@google.com>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Reviewed-by: default avatarAlex Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#793168}
parent 73b1013a
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "base/format_macros.h" #include "base/format_macros.h"
#include "base/guid.h" #include "base/guid.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/threading/thread_restrictions.h" #include "base/threading/thread_restrictions.h"
...@@ -108,6 +109,10 @@ ModelTypeWorker::ModelTypeWorker( ...@@ -108,6 +109,10 @@ ModelTypeWorker::ModelTypeWorker(
} }
ModelTypeWorker::~ModelTypeWorker() { ModelTypeWorker::~ModelTypeWorker() {
base::UmaHistogramCounts1000(
std::string("Sync.UndecryptedEntitiesOnDataTypeDisabled.") +
ModelTypeToHistogramSuffix(type_),
entries_pending_decryption_.size());
model_type_processor_->DisconnectSync(); model_type_processor_->DisconnectSync();
} }
......
...@@ -175953,6 +175953,16 @@ should be kept until we use this API. --> ...@@ -175953,6 +175953,16 @@ should be kept until we use this API. -->
</summary> </summary>
</histogram> </histogram>
<histogram base="true" name="Sync.UndecryptedEntitiesOnDataTypeDisabled"
units="sync entities" expires_after="2021-01-30">
<owner>victorvianna@google.com</owner>
<owner>treib@chromium.org</owner>
<summary>
This records the number of sync entities that were still undecrypted by the
time the data type was disabled (typically during browser shutdown).
</summary>
</histogram>
<histogram name="Sync.UnrecoverableErrors" enum="SyncUnrecoverableErrorReason" <histogram name="Sync.UnrecoverableErrors" enum="SyncUnrecoverableErrorReason"
expires_after="M85"> expires_after="M85">
<obsolete> <obsolete>
...@@ -215421,6 +215431,7 @@ regressions. --> ...@@ -215421,6 +215431,7 @@ regressions. -->
Deprecated 05/2019. Deprecated 05/2019.
</obsolete> </obsolete>
</affected-histogram> </affected-histogram>
<affected-histogram name="Sync.UndecryptedEntitiesOnDataTypeDisabled"/>
<affected-histogram name="Sync.USSMigrationEntityCount"> <affected-histogram name="Sync.USSMigrationEntityCount">
<obsolete> <obsolete>
Deprecated 05/2020. Deprecated 05/2020.
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