Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Issue 23435008: sync: Refactor MutablEntry internals (Closed)

Created:
7 years, 3 months ago by rlarocque
Modified:
7 years, 3 months ago
Reviewers:
Nicolas Zea
CC:
chromium-reviews, tim+watch_chromium.org, rsimha+watch_chromium.org, haitaol+watch_chromium.org
Visibility:
Public.

Description

sync: Refactor MutablEntry internals This is a follow-up to r223111. That change modified the public interface of MutableEntry to expose one setter function for each mutable field in the EntryKernel. This change modifies the internals of MutableEntry to match the external API. Many of the shared setter functions used to diverge significantly based on which field was being set. Now that each field has its own setter, it's easier to provide different setter implementations for each field. Some of these changes might make it look like we're unnecessarily introducing copy+paste code. However, we have more CLs on the way that introduce more differences among the setters. In particular, many of the SERVER_* field setters will be modified to no longer call SaveOriginal(). BUG=284672 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=223537

Patch Set 1 #

Patch Set 2 : Retry upload #

Patch Set 3 : Retry upload again #

Patch Set 4 : Inline more functions #

Patch Set 5 : Add missing DCHECKs #

Total comments: 11

Patch Set 6 : Fix nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+270 lines, -268 lines) Patch
M sync/syncable/mutable_entry.h View 1 2 3 2 chunks +1 line, -12 lines 0 comments Download
M sync/syncable/mutable_entry.cc View 1 2 3 4 5 6 chunks +269 lines, -256 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
rlarocque
Please review. I'm not too happy with some of this repeated code, but I can't ...
7 years, 3 months ago (2013-09-16 18:31:28 UTC) #1
Nicolas Zea
You mention sharing code between setters is an option, and I gotta admit that I ...
7 years, 3 months ago (2013-09-16 22:55:07 UTC) #2
rlarocque
The problem with categorization is that they type system limits us to sharing code only ...
7 years, 3 months ago (2013-09-16 23:49:55 UTC) #3
Nicolas Zea
LGTM with nits https://codereview.chromium.org/23435008/diff/17001/sync/syncable/mutable_entry.cc File sync/syncable/mutable_entry.cc (right): https://codereview.chromium.org/23435008/diff/17001/sync/syncable/mutable_entry.cc#newcode136 sync/syncable/mutable_entry.cc:136: ScopedKernelLock lock(dir()); On 2013/09/16 23:49:56, rlarocque ...
7 years, 3 months ago (2013-09-17 00:54:46 UTC) #4
rlarocque
https://codereview.chromium.org/23435008/diff/17001/sync/syncable/mutable_entry.cc File sync/syncable/mutable_entry.cc (right): https://codereview.chromium.org/23435008/diff/17001/sync/syncable/mutable_entry.cc#newcode430 sync/syncable/mutable_entry.cc:430: && tag != kernel_->ref(UNIQUE_BOOKMARK_TAG)) { On 2013/09/17 00:54:46, Nicolas ...
7 years, 3 months ago (2013-09-17 01:13:47 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/23435008/25001
7 years, 3 months ago (2013-09-17 01:17:03 UTC) #6
commit-bot: I haz the power
7 years, 3 months ago (2013-09-17 04:21:46 UTC) #7
Message was sent while issue was closed.
Change committed as 223537

Powered by Google App Engine
This is Rietveld 408576698