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

Side by Side Diff: sync/syncable/entry.cc

Issue 10989063: Changed DB to store node positions as Ordinals. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Ordinal default ctor now creates invalid Ordinals Created 8 years, 2 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "sync/syncable/entry.h" 5 #include "sync/syncable/entry.h"
6 6
7 #include <iomanip> 7 #include <iomanip>
8 8
9 #include "net/base/escape.h" 9 #include "net/base/escape.h"
10 #include "sync/syncable/base_transaction.h" 10 #include "sync/syncable/base_transaction.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 if (kernel->ref(static_cast<BitField>(i))) 122 if (kernel->ref(static_cast<BitField>(i)))
123 os << g_metas_columns[i].name << ", "; 123 os << g_metas_columns[i].name << ", ";
124 } 124 }
125 for ( ; i < STRING_FIELDS_END; ++i) { 125 for ( ; i < STRING_FIELDS_END; ++i) {
126 const std::string& field = kernel->ref(static_cast<StringField>(i)); 126 const std::string& field = kernel->ref(static_cast<StringField>(i));
127 os << g_metas_columns[i].name << ": " << field << ", "; 127 os << g_metas_columns[i].name << ": " << field << ", ";
128 } 128 }
129 for ( ; i < PROTO_FIELDS_END; ++i) { 129 for ( ; i < PROTO_FIELDS_END; ++i) {
130 os << g_metas_columns[i].name << ": " 130 os << g_metas_columns[i].name << ": "
131 << net::EscapePath( 131 << net::EscapePath(
132 kernel->ref(static_cast<ProtoField>(i)).SerializeAsString()) 132 kernel->ref(static_cast<ProtoField>(i)).SerializeAsString())
akalin 2012/10/05 22:40:27 did you miss my comments here re. having printable
vishwath 2012/10/08 20:17:49 Yeah, I'm not sure how I missed these two. Done. O
133 << ", "; 133 << ", ";
134 } 134 }
135 for ( ; i < ORDINAL_FIELDS_END; ++i) {
136 os << g_metas_columns[i].name << ": "
137 << kernel->ref(static_cast<OrdinalField>(i)).ToInternalValue()
akalin 2012/10/05 22:40:27 and here?
vishwath 2012/10/08 20:17:49 Done.
138 << ", ";
139 }
135 os << "TempFlags: "; 140 os << "TempFlags: ";
136 for ( ; i < BIT_TEMPS_END; ++i) { 141 for ( ; i < BIT_TEMPS_END; ++i) {
137 if (kernel->ref(static_cast<BitTemp>(i))) 142 if (kernel->ref(static_cast<BitTemp>(i)))
138 os << "#" << i - BIT_TEMPS_BEGIN << ", "; 143 os << "#" << i - BIT_TEMPS_BEGIN << ", ";
139 } 144 }
140 return os; 145 return os;
141 } 146 }
142 147
143 } // namespace syncable 148 } // namespace syncable
144 } // namespace syncer 149 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698