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

Unified Diff: sync/syncable/syncable_write_transaction.cc

Issue 1057663002: [Sync] Eliminate friends from Directory by exposing kernel via accessor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes from review. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/syncable/syncable_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/syncable_write_transaction.cc
diff --git a/sync/syncable/syncable_write_transaction.cc b/sync/syncable/syncable_write_transaction.cc
index d97ff6728aa866b0c717b6b77540b94b0d0b3f68..6a5557f2bbb8d8228c315c9c08bf429d82d0bc4c 100644
--- a/sync/syncable/syncable_write_transaction.cc
+++ b/sync/syncable/syncable_write_transaction.cc
@@ -45,7 +45,7 @@ void WriteTransaction::TrackChangesTo(const EntryKernel* entry) {
}
ImmutableEntryKernelMutationMap WriteTransaction::RecordMutations() {
- directory_->kernel_->transaction_mutex.AssertAcquired();
+ directory_->kernel()->transaction_mutex.AssertAcquired();
for (syncable::EntryKernelMutationMap::iterator it = mutations_.begin();
it != mutations_.end();) {
EntryKernel* kernel = directory()->GetEntryByHandle(it->first);
@@ -83,17 +83,17 @@ void WriteTransaction::UnlockAndNotify(
ModelTypeSet WriteTransaction::NotifyTransactionChangingAndEnding(
const ImmutableEntryKernelMutationMap& mutations) {
- directory_->kernel_->transaction_mutex.AssertAcquired();
+ directory_->kernel()->transaction_mutex.AssertAcquired();
DCHECK(!mutations.Get().empty());
WriteTransactionInfo write_transaction_info(
- directory_->kernel_->next_write_transaction_id,
+ directory_->kernel()->next_write_transaction_id,
from_here_, writer_, mutations);
- ++directory_->kernel_->next_write_transaction_id;
+ ++directory_->kernel()->next_write_transaction_id;
ImmutableWriteTransactionInfo immutable_write_transaction_info(
&write_transaction_info);
- DirectoryChangeDelegate* const delegate = directory_->kernel_->delegate;
+ DirectoryChangeDelegate* const delegate = directory_->kernel()->delegate;
std::vector<int64> entry_changed;
if (writer_ == syncable::SYNCAPI) {
delegate->HandleCalculateChangesChangeEventFromSyncApi(
@@ -108,7 +108,7 @@ ModelTypeSet WriteTransaction::NotifyTransactionChangingAndEnding(
delegate->HandleTransactionEndingChangeEvent(
immutable_write_transaction_info, this);
- directory_->kernel_->transaction_observer.Call(FROM_HERE,
+ directory_->kernel()->transaction_observer.Call(FROM_HERE,
&TransactionObserver::OnTransactionWrite,
immutable_write_transaction_info, models_with_changes);
@@ -117,7 +117,7 @@ ModelTypeSet WriteTransaction::NotifyTransactionChangingAndEnding(
void WriteTransaction::NotifyTransactionComplete(
ModelTypeSet models_with_changes) {
- directory_->kernel_->delegate->HandleTransactionCompleteChangeEvent(
+ directory_->kernel()->delegate->HandleTransactionCompleteChangeEvent(
models_with_changes);
}
« no previous file with comments | « sync/syncable/syncable_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698