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

Unified Diff: sync/syncable/directory.cc

Issue 218623014: [Sync] Add context proto and directory support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add transaction param Created 6 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_backing_store.h » ('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 97e7071e591da8a084cc5971f642bb8cdb23c5be..88fe94a4690de28036febc377fd010d77855450f 100644
--- a/sync/syncable/directory.cc
+++ b/sync/syncable/directory.cc
@@ -792,6 +792,22 @@ void Directory::IncrementTransactionVersion(ModelType type) {
kernel_->persisted_info.transaction_version[type]++;
}
+void Directory::GetDataTypeContext(BaseTransaction* trans,
+ ModelType type,
+ sync_pb::DataTypeContext* context) const {
+ ScopedKernelLock lock(this);
+ context->CopyFrom(kernel_->persisted_info.datatype_context[type]);
+}
+
+void Directory::SetDataTypeContext(
+ BaseWriteTransaction* trans,
+ ModelType type,
+ const sync_pb::DataTypeContext& context) {
+ ScopedKernelLock lock(this);
+ kernel_->persisted_info.datatype_context[type].CopyFrom(context);
+ kernel_->info_status = KERNEL_SHARE_INFO_DIRTY;
+}
+
ModelTypeSet Directory::InitialSyncEndedTypes() {
syncable::ReadTransaction trans(FROM_HERE, this);
ModelTypeSet protocol_types = ProtocolTypes();
« no previous file with comments | « sync/syncable/directory.h ('k') | sync/syncable/directory_backing_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698