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

Unified Diff: sync/syncable/directory.cc

Issue 10916174: Implement a bag of chips for sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moving persistence Created 8 years, 3 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
Index: sync/syncable/directory.cc
diff --git a/sync/syncable/directory.cc b/sync/syncable/directory.cc
index 77979ae10930c033318c87840f3f6413395ec866..644a4e20eefc5913b2a29365d807d83484b7d295 100644
--- a/sync/syncable/directory.cc
+++ b/sync/syncable/directory.cc
@@ -710,6 +710,19 @@ void Directory::set_store_birthday(const string& store_birthday) {
kernel_->info_status = KERNEL_SHARE_INFO_DIRTY;
}
+string Directory::bag_of_chips() const {
+ ScopedKernelLock lock(this);
+ return kernel_->persisted_info.bag_of_chips;
+}
+
+void Directory::set_bag_of_chips(const string& bag_of_chips) {
+ ScopedKernelLock lock(this);
+ if (kernel_->persisted_info.bag_of_chips == bag_of_chips)
+ return;
+ kernel_->persisted_info.bag_of_chips = bag_of_chips;
+ kernel_->info_status = KERNEL_SHARE_INFO_DIRTY;
+}
+
std::string Directory::GetNotificationState() const {
ScopedKernelLock lock(this);
std::string notification_state = kernel_->persisted_info.notification_state;

Powered by Google App Engine
This is Rietveld 408576698