Refactor metadata clearing in ClientTagBasedDataTypeProcessor [chromium/src : main]

0 views
Skip to first unread message

Marc Treib (Gerrit)

unread,
4:14 AM (14 hours ago) 4:14 AM
to Marc Treib, Chromium Sync Reviews, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Chromium Sync Reviews

Marc Treib added 1 comment

File components/sync/model/client_tag_based_data_type_processor.cc
Line 1425, Patchset 2 (Latest): pending_clear_metadata_ = false;
Marc Treib . unresolved

This is a little bit awkward: `ShouldClearPersistedMetadata()` sounds like it shouldn't have side effects, but it does.
I think it's still slightly better overall, but we could also try to e.g. extract the "clear due to pending clear request" code path into a separate method from "clear due to invalid metadata". WDYT?

Open in Gerrit

Related details

Attention is currently required from:
  • Chromium Sync Reviews
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic455b019cf5d2f96dc9671603559843a0e45c357
Gerrit-Change-Number: 6979666
Gerrit-PatchSet: 2
Gerrit-Owner: Marc Treib <tr...@chromium.org>
Gerrit-Reviewer: Chromium Sync Reviews <chromium-s...@google.com>
Gerrit-Reviewer: Marc Treib <tr...@chromium.org>
Gerrit-Attention: Chromium Sync Reviews <chromium-s...@google.com>
Gerrit-Comment-Date: Thu, 25 Sep 2025 08:14:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

gwsq (Gerrit)

unread,
4:15 AM (14 hours ago) 4:15 AM
to Marc Treib, Chromium Sync Reviews, Maksim Moskvitin, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Maksim Moskvitin

Message from gwsq

Reviewer source(s):
mmosk...@google.com is from context(googleclient/chrome/chromium_gwsq/components/sync/config.gwsq)

Open in Gerrit

Related details

Attention is currently required from:
  • Maksim Moskvitin
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic455b019cf5d2f96dc9671603559843a0e45c357
Gerrit-Change-Number: 6979666
Gerrit-PatchSet: 2
Gerrit-Owner: Marc Treib <tr...@chromium.org>
Gerrit-Reviewer: Maksim Moskvitin <mmosk...@google.com>
Gerrit-Reviewer: Marc Treib <tr...@chromium.org>
Gerrit-CC: Chromium Sync Reviews <chromium-s...@google.com>
Gerrit-CC: gwsq
Gerrit-Attention: Maksim Moskvitin <mmosk...@google.com>
Gerrit-Comment-Date: Thu, 25 Sep 2025 08:15:34 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Maksim Moskvitin (Gerrit)

unread,
11:11 AM (7 hours ago) 11:11 AM
to Marc Treib, Chromium Sync Reviews, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Marc Treib

Maksim Moskvitin added 1 comment

File components/sync/model/client_tag_based_data_type_processor.cc
Line 1425, Patchset 2 (Latest): pending_clear_metadata_ = false;
Marc Treib . unresolved

This is a little bit awkward: `ShouldClearPersistedMetadata()` sounds like it shouldn't have side effects, but it does.
I think it's still slightly better overall, but we could also try to e.g. extract the "clear due to pending clear request" code path into a separate method from "clear due to invalid metadata". WDYT?

Maksim Moskvitin

Can we just clear it on the calling side? (regardless of the previous state / returned value)

Open in Gerrit

Related details

Attention is currently required from:
  • Marc Treib
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic455b019cf5d2f96dc9671603559843a0e45c357
Gerrit-Change-Number: 6979666
Gerrit-PatchSet: 2
Gerrit-Owner: Marc Treib <tr...@chromium.org>
Gerrit-Reviewer: Maksim Moskvitin <mmosk...@google.com>
Gerrit-Reviewer: Marc Treib <tr...@chromium.org>
Gerrit-CC: Chromium Sync Reviews <chromium-s...@google.com>
Gerrit-CC: gwsq
Gerrit-Attention: Marc Treib <tr...@chromium.org>
Gerrit-Comment-Date: Thu, 25 Sep 2025 15:10:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Marc Treib <tr...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Marc Treib (Gerrit)

unread,
12:05 PM (6 hours ago) 12:05 PM
to Marc Treib, Chromium Sync Reviews, Maksim Moskvitin, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Maksim Moskvitin

Marc Treib voted and added 2 comments

Votes added by Marc Treib

Commit-Queue+1

2 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Marc Treib . resolved

Thanks!

File components/sync/model/client_tag_based_data_type_processor.cc
Line 1425, Patchset 2: pending_clear_metadata_ = false;
Marc Treib . resolved

This is a little bit awkward: `ShouldClearPersistedMetadata()` sounds like it shouldn't have side effects, but it does.
I think it's still slightly better overall, but we could also try to e.g. extract the "clear due to pending clear request" code path into a separate method from "clear due to invalid metadata". WDYT?

Maksim Moskvitin

Can we just clear it on the calling side? (regardless of the previous state / returned value)

Marc Treib

Yes, that works. It's a bit awkward that the checking and the resetting are at different places then, but maybe it's better than what I had here. Done.

Open in Gerrit

Related details

Attention is currently required from:
  • Maksim Moskvitin
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic455b019cf5d2f96dc9671603559843a0e45c357
Gerrit-Change-Number: 6979666
Gerrit-PatchSet: 3
Gerrit-Owner: Marc Treib <tr...@chromium.org>
Gerrit-Reviewer: Maksim Moskvitin <mmosk...@google.com>
Gerrit-Reviewer: Marc Treib <tr...@chromium.org>
Gerrit-CC: Chromium Sync Reviews <chromium-s...@google.com>
Gerrit-CC: gwsq
Gerrit-Attention: Maksim Moskvitin <mmosk...@google.com>
Gerrit-Comment-Date: Thu, 25 Sep 2025 16:04:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Marc Treib <tr...@chromium.org>
Comment-In-Reply-To: Maksim Moskvitin <mmosk...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages