| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_MUTABLE_ENTRY_H_ | 5 #ifndef SYNC_SYNCABLE_MUTABLE_ENTRY_H_ |
| 6 #define SYNC_SYNCABLE_MUTABLE_ENTRY_H_ | 6 #define SYNC_SYNCABLE_MUTABLE_ENTRY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 | 11 |
| 12 #include "base/macros.h" |
| 10 #include "sync/base/sync_export.h" | 13 #include "sync/base/sync_export.h" |
| 11 #include "sync/internal_api/public/base/model_type.h" | 14 #include "sync/internal_api/public/base/model_type.h" |
| 12 #include "sync/syncable/entry.h" | 15 #include "sync/syncable/entry.h" |
| 13 #include "sync/syncable/metahandle_set.h" | 16 #include "sync/syncable/metahandle_set.h" |
| 14 #include "sync/syncable/model_neutral_mutable_entry.h" | 17 #include "sync/syncable/model_neutral_mutable_entry.h" |
| 15 | 18 |
| 16 namespace syncer { | 19 namespace syncer { |
| 17 class WriteNode; | 20 class WriteNode; |
| 18 | 21 |
| 19 namespace syncable { | 22 namespace syncable { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 34 MutableEntry(WriteTransaction* trans, CreateNewUpdateItem, const Id& id); | 37 MutableEntry(WriteTransaction* trans, CreateNewUpdateItem, const Id& id); |
| 35 MutableEntry(WriteTransaction* trans, | 38 MutableEntry(WriteTransaction* trans, |
| 36 Create, | 39 Create, |
| 37 ModelType model_type, | 40 ModelType model_type, |
| 38 const std::string& name); | 41 const std::string& name); |
| 39 MutableEntry(WriteTransaction* trans, | 42 MutableEntry(WriteTransaction* trans, |
| 40 Create, | 43 Create, |
| 41 ModelType model_type, | 44 ModelType model_type, |
| 42 const Id& parent_id, | 45 const Id& parent_id, |
| 43 const std::string& name); | 46 const std::string& name); |
| 44 MutableEntry(WriteTransaction* trans, GetByHandle, int64); | 47 MutableEntry(WriteTransaction* trans, GetByHandle, int64_t); |
| 45 MutableEntry(WriteTransaction* trans, GetById, const Id&); | 48 MutableEntry(WriteTransaction* trans, GetById, const Id&); |
| 46 MutableEntry(WriteTransaction* trans, GetByClientTag, const std::string& tag); | 49 MutableEntry(WriteTransaction* trans, GetByClientTag, const std::string& tag); |
| 47 MutableEntry(WriteTransaction* trans, GetTypeRoot, ModelType type); | 50 MutableEntry(WriteTransaction* trans, GetTypeRoot, ModelType type); |
| 48 | 51 |
| 49 inline WriteTransaction* write_transaction() const { | 52 inline WriteTransaction* write_transaction() const { |
| 50 return write_transaction_; | 53 return write_transaction_; |
| 51 } | 54 } |
| 52 | 55 |
| 53 // Model-changing setters. These setters make user-visible changes that will | 56 // Model-changing setters. These setters make user-visible changes that will |
| 54 // need to be communicated either to the local model or the sync server. | 57 // need to be communicated either to the local model or the sync server. |
| 55 void PutLocalExternalId(int64 value); | 58 void PutLocalExternalId(int64_t value); |
| 56 void PutMtime(base::Time value); | 59 void PutMtime(base::Time value); |
| 57 void PutCtime(base::Time value); | 60 void PutCtime(base::Time value); |
| 58 void PutParentId(const Id& value); | 61 void PutParentId(const Id& value); |
| 59 void PutIsDir(bool value); | 62 void PutIsDir(bool value); |
| 60 void PutIsDel(bool value); | 63 void PutIsDel(bool value); |
| 61 void PutNonUniqueName(const std::string& value); | 64 void PutNonUniqueName(const std::string& value); |
| 62 void PutSpecifics(const sync_pb::EntitySpecifics& value); | 65 void PutSpecifics(const sync_pb::EntitySpecifics& value); |
| 63 void PutUniquePosition(const UniquePosition& value); | 66 void PutUniquePosition(const UniquePosition& value); |
| 64 | 67 |
| 65 // Sets the position of this item, and updates the entry kernels of the | 68 // Sets the position of this item, and updates the entry kernels of the |
| (...skipping 18 matching lines...) Expand all Loading... |
| 84 DISALLOW_COPY_AND_ASSIGN(MutableEntry); | 87 DISALLOW_COPY_AND_ASSIGN(MutableEntry); |
| 85 }; | 88 }; |
| 86 | 89 |
| 87 // This function sets only the flags needed to get this entry to sync. | 90 // This function sets only the flags needed to get this entry to sync. |
| 88 bool MarkForSyncing(syncable::MutableEntry* e); | 91 bool MarkForSyncing(syncable::MutableEntry* e); |
| 89 | 92 |
| 90 } // namespace syncable | 93 } // namespace syncable |
| 91 } // namespace syncer | 94 } // namespace syncer |
| 92 | 95 |
| 93 #endif // SYNC_SYNCABLE_MUTABLE_ENTRY_H_ | 96 #endif // SYNC_SYNCABLE_MUTABLE_ENTRY_H_ |
| OLD | NEW |