OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/sync/engine/syncapi.h" | 5 #include "chrome/browser/sync/engine/syncapi.h" |
6 | 6 |
7 #include <bitset> | 7 #include <bitset> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 | 209 |
210 int64 BaseNode::GetParentId() const { | 210 int64 BaseNode::GetParentId() const { |
211 return IdToMetahandle(GetTransaction()->GetWrappedTrans(), | 211 return IdToMetahandle(GetTransaction()->GetWrappedTrans(), |
212 GetEntry()->Get(syncable::PARENT_ID)); | 212 GetEntry()->Get(syncable::PARENT_ID)); |
213 } | 213 } |
214 | 214 |
215 int64 BaseNode::GetId() const { | 215 int64 BaseNode::GetId() const { |
216 return GetEntry()->Get(syncable::META_HANDLE); | 216 return GetEntry()->Get(syncable::META_HANDLE); |
217 } | 217 } |
218 | 218 |
| 219 int64 BaseNode::GetModificationTime() const { |
| 220 return GetEntry()->Get(syncable::MTIME); |
| 221 } |
| 222 |
219 bool BaseNode::GetIsFolder() const { | 223 bool BaseNode::GetIsFolder() const { |
220 return GetEntry()->Get(syncable::IS_DIR); | 224 return GetEntry()->Get(syncable::IS_DIR); |
221 } | 225 } |
222 | 226 |
223 std::wstring BaseNode::GetTitle() const { | 227 std::wstring BaseNode::GetTitle() const { |
224 std::wstring result; | 228 std::wstring result; |
225 ServerNameToSyncAPIName(GetEntry()->Get(syncable::NON_UNIQUE_NAME), &result); | 229 ServerNameToSyncAPIName(GetEntry()->Get(syncable::NON_UNIQUE_NAME), &result); |
226 return result; | 230 return result; |
227 } | 231 } |
228 | 232 |
(...skipping 2118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2347 DCHECK(data_->initialized()) << "GetUserShare requires initialization!"; | 2351 DCHECK(data_->initialized()) << "GetUserShare requires initialization!"; |
2348 return data_->GetUserShare(); | 2352 return data_->GetUserShare(); |
2349 } | 2353 } |
2350 | 2354 |
2351 bool SyncManager::HasUnsyncedItems() const { | 2355 bool SyncManager::HasUnsyncedItems() const { |
2352 sync_api::ReadTransaction trans(GetUserShare()); | 2356 sync_api::ReadTransaction trans(GetUserShare()); |
2353 return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0); | 2357 return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0); |
2354 } | 2358 } |
2355 | 2359 |
2356 } // namespace sync_api | 2360 } // namespace sync_api |
OLD | NEW |