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 "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 17 matching lines...) Expand all Loading... |
28 void Init(WriteTransaction* trans, ModelType model_type, | 28 void Init(WriteTransaction* trans, ModelType model_type, |
29 const Id& parent_id, const std::string& name); | 29 const Id& parent_id, const std::string& name); |
30 | 30 |
31 public: | 31 public: |
32 MutableEntry(WriteTransaction* trans, CreateNewUpdateItem, const Id& id); | 32 MutableEntry(WriteTransaction* trans, CreateNewUpdateItem, const Id& id); |
33 MutableEntry(WriteTransaction* trans, Create, ModelType model_type, | 33 MutableEntry(WriteTransaction* trans, Create, ModelType model_type, |
34 const Id& parent_id, const std::string& name); | 34 const Id& parent_id, const std::string& name); |
35 MutableEntry(WriteTransaction* trans, GetByHandle, int64); | 35 MutableEntry(WriteTransaction* trans, GetByHandle, int64); |
36 MutableEntry(WriteTransaction* trans, GetById, const Id&); | 36 MutableEntry(WriteTransaction* trans, GetById, const Id&); |
37 MutableEntry(WriteTransaction* trans, GetByClientTag, const std::string& tag); | 37 MutableEntry(WriteTransaction* trans, GetByClientTag, const std::string& tag); |
38 MutableEntry(WriteTransaction* trans, GetByServerTag, const std::string& tag); | 38 MutableEntry(WriteTransaction* trans, GetTypeRoot, ModelType type); |
39 | 39 |
40 inline WriteTransaction* write_transaction() const { | 40 inline WriteTransaction* write_transaction() const { |
41 return write_transaction_; | 41 return write_transaction_; |
42 } | 42 } |
43 | 43 |
44 // Model-changing setters. These setters make user-visible changes that will | 44 // Model-changing setters. These setters make user-visible changes that will |
45 // need to be communicated either to the local model or the sync server. | 45 // need to be communicated either to the local model or the sync server. |
46 void PutLocalExternalId(int64 value); | 46 void PutLocalExternalId(int64 value); |
47 void PutMtime(base::Time value); | 47 void PutMtime(base::Time value); |
48 void PutCtime(base::Time value); | 48 void PutCtime(base::Time value); |
(...skipping 28 matching lines...) Expand all Loading... |
77 DISALLOW_COPY_AND_ASSIGN(MutableEntry); | 77 DISALLOW_COPY_AND_ASSIGN(MutableEntry); |
78 }; | 78 }; |
79 | 79 |
80 // This function sets only the flags needed to get this entry to sync. | 80 // This function sets only the flags needed to get this entry to sync. |
81 bool MarkForSyncing(syncable::MutableEntry* e); | 81 bool MarkForSyncing(syncable::MutableEntry* e); |
82 | 82 |
83 } // namespace syncable | 83 } // namespace syncable |
84 } // namespace syncer | 84 } // namespace syncer |
85 | 85 |
86 #endif // SYNC_SYNCABLE_MUTABLE_ENTRY_H_ | 86 #endif // SYNC_SYNCABLE_MUTABLE_ENTRY_H_ |
OLD | NEW |