Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(652)

Unified Diff: sync/syncable/entry.cc

Issue 11636006: WIP: The Bookmark Position Megapatch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Various updates, including switch suffix to unique_client_tag style Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/syncable/entry.h ('k') | sync/syncable/entry_kernel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/entry.cc
diff --git a/sync/syncable/entry.cc b/sync/syncable/entry.cc
index a0c8a4a84a1687c5713f7b26700063e37e21cad6..5d3713c40abd1388566ac7af7749a0ac0004a149 100644
--- a/sync/syncable/entry.cc
+++ b/sync/syncable/entry.cc
@@ -41,10 +41,6 @@ Directory* Entry::dir() const {
return basetrans_->directory();
}
-Id Entry::ComputePrevIdFromServerPosition(const Id& parent_id) const {
- return dir()->ComputePrevIdFromServerPosition(kernel_, parent_id);
-}
-
DictionaryValue* Entry::ToValue(Cryptographer* cryptographer) const {
DictionaryValue* entry_info = new DictionaryValue();
entry_info->SetBoolean("good", good());
@@ -64,6 +60,11 @@ const string& Entry::Get(StringField field) const {
return kernel_->ref(field);
}
+const string& Entry::Get(BytesField field) const {
+ DCHECK(kernel_);
+ return kernel_->ref(field);
+}
+
ModelType Entry::GetServerModelType() const {
ModelType specifics_type = kernel_->GetServerModelType();
if (specifics_type != UNSPECIFIED)
@@ -95,6 +96,18 @@ ModelType Entry::GetModelType() const {
return UNSPECIFIED;
}
+Id Entry::GetPredecessorId() const {
+ return dir()->GetPredecessorId(kernel_);
+}
+
+Id Entry::GetSuccessorId() const {
+ return dir()->GetSuccessorId(kernel_);
+}
+
+Id Entry::GetFirstChildId() const {
+ return dir()->GetFirstChildId(basetrans_, kernel_);
+}
+
std::ostream& operator<<(std::ostream& s, const Blob& blob) {
for (Blob::const_iterator i = blob.begin(); i != blob.end(); ++i)
s << std::hex << std::setw(2)
@@ -134,9 +147,9 @@ std::ostream& operator<<(std::ostream& os, const Entry& entry) {
&escaped_str);
os << g_metas_columns[i].name << ": " << escaped_str << ", ";
}
- for ( ; i < ORDINAL_FIELDS_END; ++i) {
+ for ( ; i < UNIQUE_POSITION_FIELDS_END; ++i) {
os << g_metas_columns[i].name << ": "
- << kernel->ref(static_cast<OrdinalField>(i)).ToDebugString()
+ << kernel->ref(static_cast<UniquePositionField>(i)).ToDebugString()
<< ", ";
}
os << "TempFlags: ";
« no previous file with comments | « sync/syncable/entry.h ('k') | sync/syncable/entry_kernel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698