OLD | NEW |
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_kernel.h" | 5 #include "sync/syncable/entry_kernel.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "base/json/string_escape.h" | 9 #include "base/json/string_escape.h" |
8 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
9 #include "sync/protocol/proto_value_conversions.h" | 11 #include "sync/protocol/proto_value_conversions.h" |
10 #include "sync/syncable/syncable_columns.h" | 12 #include "sync/syncable/syncable_columns.h" |
11 #include "sync/syncable/syncable_enum_conversions.h" | 13 #include "sync/syncable/syncable_enum_conversions.h" |
12 #include "sync/util/cryptographer.h" | 14 #include "sync/util/cryptographer.h" |
13 | 15 |
14 namespace syncer { | 16 namespace syncer { |
15 namespace syncable { | 17 namespace syncable { |
16 | 18 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 value->SetBoolean("encrypted", true); | 110 value->SetBoolean("encrypted", true); |
109 } else { | 111 } else { |
110 value = EntitySpecificsToValue(kernel.ref(field)); | 112 value = EntitySpecificsToValue(kernel.ref(field)); |
111 } | 113 } |
112 dictionary_value->Set(key, value.Pass()); | 114 dictionary_value->Set(key, value.Pass()); |
113 } | 115 } |
114 } | 116 } |
115 | 117 |
116 // Helper functions for SetFieldValues(). | 118 // Helper functions for SetFieldValues(). |
117 | 119 |
118 base::StringValue* Int64ToValue(int64 i) { | 120 base::StringValue* Int64ToValue(int64_t i) { |
119 return new base::StringValue(base::Int64ToString(i)); | 121 return new base::StringValue(base::Int64ToString(i)); |
120 } | 122 } |
121 | 123 |
122 base::StringValue* TimeToValue(const base::Time& t) { | 124 base::StringValue* TimeToValue(const base::Time& t) { |
123 return new base::StringValue(GetTimeDebugString(t)); | 125 return new base::StringValue(GetTimeDebugString(t)); |
124 } | 126 } |
125 | 127 |
126 base::StringValue* IdToValue(const Id& id) { | 128 base::StringValue* IdToValue(const Id& id) { |
127 return id.ToValue(); | 129 return id.ToValue(); |
128 } | 130 } |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 os << "TempFlags: "; | 284 os << "TempFlags: "; |
283 for (; i < BIT_TEMPS_END; ++i) { | 285 for (; i < BIT_TEMPS_END; ++i) { |
284 if (kernel->ref(static_cast<BitTemp>(i))) | 286 if (kernel->ref(static_cast<BitTemp>(i))) |
285 os << "#" << i - BIT_TEMPS_BEGIN << ", "; | 287 os << "#" << i - BIT_TEMPS_BEGIN << ", "; |
286 } | 288 } |
287 return os; | 289 return os; |
288 } | 290 } |
289 | 291 |
290 } // namespace syncable | 292 } // namespace syncable |
291 } // namespace syncer | 293 } // namespace syncer |
OLD | NEW |