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

Side by Side Diff: sync/syncable/model_neutral_mutable_entry.h

Issue 1237493002: Sync: MutableEntry shouldn't track changes that have no actual impact on the stored data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | sync/syncable/model_neutral_mutable_entry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SYNC_SYNCABLE_MODEL_NEUTRAL_MUTABLE_ENTRY_H_ 5 #ifndef SYNC_SYNCABLE_MODEL_NEUTRAL_MUTABLE_ENTRY_H_
6 #define SYNC_SYNCABLE_MODEL_NEUTRAL_MUTABLE_ENTRY_H_ 6 #define SYNC_SYNCABLE_MODEL_NEUTRAL_MUTABLE_ENTRY_H_
7 7
8 #include "sync/base/sync_export.h" 8 #include "sync/base/sync_export.h"
9 #include "sync/internal_api/public/base/model_type.h" 9 #include "sync/internal_api/public/base/model_type.h"
10 #include "sync/syncable/entry.h" 10 #include "sync/syncable/entry.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 // This is similar to what one would expect from Put(TRANSACTION_VERSION), 94 // This is similar to what one would expect from Put(TRANSACTION_VERSION),
95 // except that it doesn't bother to invoke 'SaveOriginals'. Calling that 95 // except that it doesn't bother to invoke 'SaveOriginals'. Calling that
96 // function is at best unnecessary, since the transaction will have already 96 // function is at best unnecessary, since the transaction will have already
97 // used its list of mutations by the time this function is called. 97 // used its list of mutations by the time this function is called.
98 void UpdateTransactionVersion(int64 version); 98 void UpdateTransactionVersion(int64 version);
99 99
100 protected: 100 protected:
101 explicit ModelNeutralMutableEntry(BaseWriteTransaction* trans); 101 explicit ModelNeutralMutableEntry(BaseWriteTransaction* trans);
102 102
103 syncable::MetahandleSet* GetDirtyIndexHelper(); 103 void MarkDirty();
104 104
105 private: 105 private:
106 friend class syncer::WriteNode; 106 friend class syncer::WriteNode;
107 friend class Directory; 107 friend class Directory;
108 108
109 // Don't allow creation on heap, except by sync API wrappers. 109 // Don't allow creation on heap, except by sync API wrappers.
110 void* operator new(size_t size) { return (::operator new)(size); } 110 void* operator new(size_t size) { return (::operator new)(size); }
111 111
112 // Kind of redundant. We should reduce the number of pointers 112 // Kind of redundant. We should reduce the number of pointers
113 // floating around if at all possible. Could we store this in Directory? 113 // floating around if at all possible. Could we store this in Directory?
114 // Scope: Set on construction, never changed after that. 114 // Scope: Set on construction, never changed after that.
115 BaseWriteTransaction* const base_write_transaction_; 115 BaseWriteTransaction* const base_write_transaction_;
116 116
117 DISALLOW_COPY_AND_ASSIGN(ModelNeutralMutableEntry); 117 DISALLOW_COPY_AND_ASSIGN(ModelNeutralMutableEntry);
118 }; 118 };
119 119
120 } // namespace syncable 120 } // namespace syncable
121 } // namespace syncer 121 } // namespace syncer
122 122
123 #endif // SYNC_SYNCABLE_MODEL_NEUTRAL_MUTABLE_ENTRY_H_ 123 #endif // SYNC_SYNCABLE_MODEL_NEUTRAL_MUTABLE_ENTRY_H_
OLDNEW
« no previous file with comments | « no previous file | sync/syncable/model_neutral_mutable_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698