| OLD | NEW |
| 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 Loading... |
| 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 void MarkDirty(); | 103 syncable::MetahandleSet* GetDirtyIndexHelper(); |
| 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_ |
| OLD | NEW |