| 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 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2268 DCHECK(data_->initialized()) << "GetUserShare requires initialization!"; | 2272 DCHECK(data_->initialized()) << "GetUserShare requires initialization!"; |
| 2269 return data_->GetUserShare(); | 2273 return data_->GetUserShare(); |
| 2270 } | 2274 } |
| 2271 | 2275 |
| 2272 bool SyncManager::HasUnsyncedItems() const { | 2276 bool SyncManager::HasUnsyncedItems() const { |
| 2273 sync_api::ReadTransaction trans(GetUserShare()); | 2277 sync_api::ReadTransaction trans(GetUserShare()); |
| 2274 return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0); | 2278 return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0); |
| 2275 } | 2279 } |
| 2276 | 2280 |
| 2277 } // namespace sync_api | 2281 } // namespace sync_api |
| OLD | NEW |