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

Unified Diff: sync/syncable/directory.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/directory.h ('k') | sync/syncable/directory_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/directory.cc
diff --git a/sync/syncable/directory.cc b/sync/syncable/directory.cc
index e603e4e1d7d2d7ba252dd56c06f4caaa91b85e58..45e0798da5aff4a941ec49270faa57e8a751558b 100644
--- a/sync/syncable/directory.cc
+++ b/sync/syncable/directory.cc
@@ -189,6 +189,7 @@ DirOpenResult Directory::OpenImpl(
if (OPENED != result)
return result;
+ DCHECK(!kernel_);
kernel_ = new Kernel(name, info, delegate, transaction_observer);
delete_journal_.reset(new DeleteJournal(&delete_journals));
InitializeIndices(&tmp_handles_map);
@@ -1548,5 +1549,13 @@ void Directory::GetAttachmentIdsToUpload(BaseTransaction* trans,
std::back_inserter(*ids));
}
+Directory::Kernel* Directory::kernel() {
+ return kernel_;
+}
+
+const Directory::Kernel* Directory::kernel() const {
+ return kernel_;
+}
+
} // namespace syncable
} // namespace syncer
« no previous file with comments | « sync/syncable/directory.h ('k') | sync/syncable/directory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698