Commit 3228ad3f authored by Rushan Suleymanov's avatar Rushan Suleymanov Committed by Chromium LUCI CQ

[Sync] Remove obsolete histogram for full titles in bookmarks

This metrics shows fullness of the full title field in specifics. Since
most of bookmarks were reuploaded, this metric is not needed anymore.

Bug: 1153774
Change-Id: Iacc69717212f6ec41cd327c6a0ade0f677768d32
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2600831Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
Reviewed-by: default avatarBrian White <bcwhite@chromium.org>
Commit-Queue: Rushan Suleymanov <rushans@google.com>
Cr-Commit-Position: refs/heads/master@{#843558}
parent f95d90e3
...@@ -646,7 +646,6 @@ void BookmarkModelMerger::MergeSubtree( ...@@ -646,7 +646,6 @@ void BookmarkModelMerger::MergeSubtree(
if (!local_subtree_root->is_permanent_node() && if (!local_subtree_root->is_permanent_node() &&
IsBookmarkEntityReuploadNeeded(remote_update_entity)) { IsBookmarkEntityReuploadNeeded(remote_update_entity)) {
bookmark_tracker_->IncrementSequenceNumber(entity); bookmark_tracker_->IncrementSequenceNumber(entity);
++valid_updates_without_full_title_;
} }
// If there are remote child updates, try to match them. // If there are remote child updates, try to match them.
...@@ -801,7 +800,6 @@ void BookmarkModelMerger::ProcessRemoteCreation( ...@@ -801,7 +800,6 @@ void BookmarkModelMerger::ProcessRemoteCreation(
specifics); specifics);
if (IsBookmarkEntityReuploadNeeded(remote_node.entity())) { if (IsBookmarkEntityReuploadNeeded(remote_node.entity())) {
bookmark_tracker_->IncrementSequenceNumber(entity); bookmark_tracker_->IncrementSequenceNumber(entity);
++valid_updates_without_full_title_;
} }
// Recursively, match by GUID or, if not possible, create local node for all // Recursively, match by GUID or, if not possible, create local node for all
......
...@@ -52,10 +52,6 @@ class BookmarkModelMerger { ...@@ -52,10 +52,6 @@ class BookmarkModelMerger {
// and metadata entities in the injected tracker. // and metadata entities in the injected tracker.
void Merge(); void Merge();
size_t valid_updates_without_full_title_for_uma() const {
return valid_updates_without_full_title_;
}
private: private:
// Internal representation of a remote tree, composed of nodes. // Internal representation of a remote tree, composed of nodes.
class RemoteTreeNode final { class RemoteTreeNode final {
...@@ -205,8 +201,6 @@ class BookmarkModelMerger { ...@@ -205,8 +201,6 @@ class BookmarkModelMerger {
const RemoteForest remote_forest_; const RemoteForest remote_forest_;
std::unordered_map<base::GUID, GuidMatch, base::GUIDHash> guid_to_match_map_; std::unordered_map<base::GUID, GuidMatch, base::GUIDHash> guid_to_match_map_;
size_t valid_updates_without_full_title_ = 0;
DISALLOW_COPY_AND_ASSIGN(BookmarkModelMerger); DISALLOW_COPY_AND_ASSIGN(BookmarkModelMerger);
}; };
......
...@@ -206,10 +206,6 @@ void BookmarkModelTypeProcessor::OnUpdateReceived( ...@@ -206,10 +206,6 @@ void BookmarkModelTypeProcessor::OnUpdateReceived(
// Schedule save just in case one is needed. // Schedule save just in case one is needed.
schedule_save_closure_.Run(); schedule_save_closure_.Run();
} }
base::UmaHistogramCounts10000(
"Sync.BookmarksWithoutFullTitle.OnRemoteUpdate",
updates_handler.valid_updates_without_full_title_for_uma());
} }
const SyncedBookmarkTracker* BookmarkModelTypeProcessor::GetTrackerForTest() const SyncedBookmarkTracker* BookmarkModelTypeProcessor::GetTrackerForTest()
...@@ -422,10 +418,6 @@ void BookmarkModelTypeProcessor::OnInitialUpdateReceived( ...@@ -422,10 +418,6 @@ void BookmarkModelTypeProcessor::OnInitialUpdateReceived(
BookmarkModelMerger model_merger(std::move(updates), bookmark_model_, BookmarkModelMerger model_merger(std::move(updates), bookmark_model_,
favicon_service_, bookmark_tracker_.get()); favicon_service_, bookmark_tracker_.get());
model_merger.Merge(); model_merger.Merge();
base::UmaHistogramCounts1M(
"Sync.BookmarksWithoutFullTitle.OnInitialMerge",
model_merger.valid_updates_without_full_title_for_uma());
} }
// If any of the permanent nodes is missing, we treat it as failure. // If any of the permanent nodes is missing, we treat it as failure.
......
...@@ -794,7 +794,6 @@ void BookmarkRemoteUpdatesHandler::ReuploadEntityIfNeeded( ...@@ -794,7 +794,6 @@ void BookmarkRemoteUpdatesHandler::ReuploadEntityIfNeeded(
!tracked_entity->bookmark_node()->is_permanent_node() && !tracked_entity->bookmark_node()->is_permanent_node() &&
IsBookmarkEntityReuploadNeeded(entity_data)) { IsBookmarkEntityReuploadNeeded(entity_data)) {
bookmark_tracker_->IncrementSequenceNumber(tracked_entity); bookmark_tracker_->IncrementSequenceNumber(tracked_entity);
++valid_updates_without_full_title_;
} }
} }
......
...@@ -52,10 +52,6 @@ class BookmarkRemoteUpdatesHandler { ...@@ -52,10 +52,6 @@ class BookmarkRemoteUpdatesHandler {
static std::vector<const syncer::UpdateResponseData*> ReorderUpdatesForTest( static std::vector<const syncer::UpdateResponseData*> ReorderUpdatesForTest(
const syncer::UpdateResponseDataList* updates); const syncer::UpdateResponseDataList* updates);
size_t valid_updates_without_full_title_for_uma() const {
return valid_updates_without_full_title_;
}
static size_t ComputeChildNodeIndexForTest( static size_t ComputeChildNodeIndexForTest(
const bookmarks::BookmarkNode* parent, const bookmarks::BookmarkNode* parent,
const sync_pb::UniquePosition& unique_position, const sync_pb::UniquePosition& unique_position,
...@@ -125,9 +121,6 @@ class BookmarkRemoteUpdatesHandler { ...@@ -125,9 +121,6 @@ class BookmarkRemoteUpdatesHandler {
favicon::FaviconService* const favicon_service_; favicon::FaviconService* const favicon_service_;
SyncedBookmarkTracker* const bookmark_tracker_; SyncedBookmarkTracker* const bookmark_tracker_;
// Counts number of initiated reuploads.
size_t valid_updates_without_full_title_ = 0;
DISALLOW_COPY_AND_ASSIGN(BookmarkRemoteUpdatesHandler); DISALLOW_COPY_AND_ASSIGN(BookmarkRemoteUpdatesHandler);
}; };
......
...@@ -108,6 +108,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. ...@@ -108,6 +108,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
<histogram name="Sync.BookmarksWithoutFullTitle.OnInitialMerge" <histogram name="Sync.BookmarksWithoutFullTitle.OnInitialMerge"
units="bookmarks" expires_after="M89"> units="bookmarks" expires_after="M89">
<obsolete>
Removed as of M89.
</obsolete>
<owner>rushans@google.com</owner> <owner>rushans@google.com</owner>
<owner>mastiz@chromiumg.org</owner> <owner>mastiz@chromiumg.org</owner>
<summary> <summary>
...@@ -118,6 +121,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. ...@@ -118,6 +121,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
<histogram name="Sync.BookmarksWithoutFullTitle.OnRemoteUpdate" <histogram name="Sync.BookmarksWithoutFullTitle.OnRemoteUpdate"
units="bookmarks" expires_after="M89"> units="bookmarks" expires_after="M89">
<obsolete>
Removed as of M89.
</obsolete>
<owner>rushans@google.com</owner> <owner>rushans@google.com</owner>
<owner>mastiz@chromiumg.org</owner> <owner>mastiz@chromiumg.org</owner>
<summary> <summary>
......
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