OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_INTERNAL_API_BASE_NODE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_INTERNAL_API_BASE_NODE_H_ |
6 #define CHROME_BROWSER_SYNC_INTERNAL_API_BASE_NODE_H_ | 6 #define CHROME_BROWSER_SYNC_INTERNAL_API_BASE_NODE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // will return FALSE. | 66 // will return FALSE. |
67 virtual bool InitByClientTagLookup(syncable::ModelType model_type, | 67 virtual bool InitByClientTagLookup(syncable::ModelType model_type, |
68 const std::string& tag) = 0; | 68 const std::string& tag) = 0; |
69 | 69 |
70 // Each object is identified by a 64-bit id (internally, the syncable | 70 // Each object is identified by a 64-bit id (internally, the syncable |
71 // metahandle). These ids are strictly local handles. They will persist | 71 // metahandle). These ids are strictly local handles. They will persist |
72 // on this client, but the same object on a different client may have a | 72 // on this client, but the same object on a different client may have a |
73 // different ID value. | 73 // different ID value. |
74 virtual int64 GetId() const; | 74 virtual int64 GetId() const; |
75 | 75 |
76 // Returns the modification time of the object (in TimeTicks internal format). | 76 // Returns the modification time of the object. |
77 int64 GetModificationTime() const; | 77 const base::Time& GetModificationTime() const; |
78 | 78 |
79 // Nodes are hierarchically arranged into a single-rooted tree. | 79 // Nodes are hierarchically arranged into a single-rooted tree. |
80 // InitByRootLookup on ReadNode allows access to the root. GetParentId is | 80 // InitByRootLookup on ReadNode allows access to the root. GetParentId is |
81 // how you find a node's parent. | 81 // how you find a node's parent. |
82 int64 GetParentId() const; | 82 int64 GetParentId() const; |
83 | 83 |
84 // Nodes are either folders or not. This corresponds to the IS_DIR property | 84 // Nodes are either folders or not. This corresponds to the IS_DIR property |
85 // of syncable::Entry. | 85 // of syncable::Entry. |
86 bool GetIsFolder() const; | 86 bool GetIsFolder() const; |
87 | 87 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 215 |
216 friend class SyncApiTest; | 216 friend class SyncApiTest; |
217 FRIEND_TEST_ALL_PREFIXES(SyncApiTest, GenerateSyncableHash); | 217 FRIEND_TEST_ALL_PREFIXES(SyncApiTest, GenerateSyncableHash); |
218 | 218 |
219 DISALLOW_COPY_AND_ASSIGN(BaseNode); | 219 DISALLOW_COPY_AND_ASSIGN(BaseNode); |
220 }; | 220 }; |
221 | 221 |
222 } // namespace sync_api | 222 } // namespace sync_api |
223 | 223 |
224 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_BASE_NODE_H_ | 224 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_BASE_NODE_H_ |
OLD | NEW |