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

Issue 1057663002: [Sync] Eliminate friends from Directory by exposing kernel via accessor (Closed)

Created:
5 years, 8 months ago by maniscalco
Modified:
5 years, 8 months ago
Reviewers:
Nicolas Zea
CC:
chromium-reviews, tim+watch_chromium.org, zea+watch_chromium.org, maxbogue+watch_chromium.org, pvalenzuela+watch_chromium.org, plaree+watch_chromium.org, maniscalco+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sync] Eliminate friends from Directory by exposing kernel via accessor This is a minor refactoring of Directory that eliminates non-test friends and provides access to Directory's kernel using public accessor methods. Make Directory::Close private as it's automatically called from the dtor. Make Directory::Kernel public instead of having Directory be-friend several classes. Make Directory::Kernel::mutex mutable to eliminate the need for a const_cast in ScopedKernelLock. Make OnDiskDirectoryBackingStore::TryLoad private. BUG=475557 Committed: https://crrev.com/089b9366f4cb360bda3245d8c831e3362bfc839c Cr-Commit-Position: refs/heads/master@{#323850}

Patch Set 1 #

Patch Set 2 : Update comments and reorder struct Kernel definition. #

Patch Set 3 : Remove unnecessary type qualifier on kernel()'s return type. #

Total comments: 2

Patch Set 4 : Changes from review. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+217 lines, -211 lines) Patch
M sync/internal_api/sync_rollback_manager_base.cc View 1 chunk +0 lines, -1 line 0 comments Download
M sync/syncable/directory.h View 1 2 3 5 chunks +130 lines, -128 lines 0 comments Download
M sync/syncable/directory.cc View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M sync/syncable/directory_unittest.cc View 7 chunks +8 lines, -8 lines 0 comments Download
M sync/syncable/model_neutral_mutable_entry.cc View 1 2 3 21 chunks +33 lines, -33 lines 0 comments Download
M sync/syncable/mutable_entry.cc View 1 2 3 10 chunks +12 lines, -12 lines 0 comments Download
M sync/syncable/on_disk_directory_backing_store.h View 2 chunks +5 lines, -7 lines 0 comments Download
M sync/syncable/scoped_kernel_lock.h View 1 chunk +1 line, -1 line 0 comments Download
M sync/syncable/scoped_kernel_lock.cc View 1 chunk +1 line, -1 line 0 comments Download
M sync/syncable/syncable_base_transaction.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M sync/syncable/syncable_unittest.cc View 1 1 chunk +9 lines, -11 lines 0 comments Download
M sync/syncable/syncable_write_transaction.cc View 4 chunks +7 lines, -7 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
maniscalco
Nicolas, would you please review this change? It's a relatively minor refactoring change that looks ...
5 years, 8 months ago (2015-04-01 21:07:08 UTC) #1
Nicolas Zea
Just saw this (looks like I wasn't actually added as a reviewer). Adding myself and ...
5 years, 8 months ago (2015-04-03 00:16:20 UTC) #3
maniscalco
Oops, thanks, that was my intention. Rietveld is good, but I guess it doesn't read ...
5 years, 8 months ago (2015-04-03 15:31:52 UTC) #4
Nicolas Zea
This is much cleaner. LGTM! https://codereview.chromium.org/1057663002/diff/40001/sync/syncable/directory.h File sync/syncable/directory.h (right): https://codereview.chromium.org/1057663002/diff/40001/sync/syncable/directory.h#newcode516 sync/syncable/directory.h:516: // For new entry ...
5 years, 8 months ago (2015-04-03 17:54:50 UTC) #5
maniscalco
Thanks for the speedy review. https://codereview.chromium.org/1057663002/diff/40001/sync/syncable/directory.h File sync/syncable/directory.h (right): https://codereview.chromium.org/1057663002/diff/40001/sync/syncable/directory.h#newcode516 sync/syncable/directory.h:516: // For new entry ...
5 years, 8 months ago (2015-04-03 22:57:28 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1057663002/60001
5 years, 8 months ago (2015-04-03 22:58:16 UTC) #9
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 8 months ago (2015-04-03 23:45:04 UTC) #10
commit-bot: I haz the power
5 years, 8 months ago (2015-04-03 23:46:37 UTC) #11
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/089b9366f4cb360bda3245d8c831e3362bfc839c
Cr-Commit-Position: refs/heads/master@{#323850}

Powered by Google App Engine
This is Rietveld 408576698