pending_clear_metadata_ = false;
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?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Reviewer source(s):
mmosk...@google.com is from context(googleclient/chrome/chromium_gwsq/components/sync/config.gwsq)
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
pending_clear_metadata_ = false;
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?
Can we just clear it on the calling side? (regardless of the previous state / returned value)
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Commit-Queue | +1 |
Maksim MoskvitinThis 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?
Can we just clear it on the calling side? (regardless of the previous state / returned value)
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.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |