| 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 "components/sync/syncable/entry_kernel.h" | 5 #include "components/sync/syncable/entry_kernel.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/json/string_escape.h" | 9 #include "base/json/string_escape.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 for (EntryKernelMutationMap::const_iterator it = mutations.begin(); | 217 for (EntryKernelMutationMap::const_iterator it = mutations.begin(); |
| 218 it != mutations.end(); ++it) { | 218 it != mutations.end(); ++it) { |
| 219 list->Append(EntryKernelMutationToValue(it->second)); | 219 list->Append(EntryKernelMutationToValue(it->second)); |
| 220 } | 220 } |
| 221 return list; | 221 return list; |
| 222 } | 222 } |
| 223 | 223 |
| 224 std::unique_ptr<base::DictionaryValue> EntryKernelMutationToValue( | 224 std::unique_ptr<base::DictionaryValue> EntryKernelMutationToValue( |
| 225 const EntryKernelMutation& mutation) { | 225 const EntryKernelMutation& mutation) { |
| 226 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 226 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| 227 dict->Set("original", mutation.original.ToValue(NULL)); | 227 dict->Set("original", mutation.original.ToValue(nullptr)); |
| 228 dict->Set("mutated", mutation.mutated.ToValue(NULL)); | 228 dict->Set("mutated", mutation.mutated.ToValue(nullptr)); |
| 229 return dict; | 229 return dict; |
| 230 } | 230 } |
| 231 | 231 |
| 232 std::ostream& operator<<(std::ostream& os, const EntryKernel& entry_kernel) { | 232 std::ostream& operator<<(std::ostream& os, const EntryKernel& entry_kernel) { |
| 233 int i; | 233 int i; |
| 234 EntryKernel* const kernel = const_cast<EntryKernel*>(&entry_kernel); | 234 EntryKernel* const kernel = const_cast<EntryKernel*>(&entry_kernel); |
| 235 for (i = BEGIN_FIELDS; i < INT64_FIELDS_END; ++i) { | 235 for (i = BEGIN_FIELDS; i < INT64_FIELDS_END; ++i) { |
| 236 os << g_metas_columns[i].name << ": " | 236 os << g_metas_columns[i].name << ": " |
| 237 << kernel->ref(static_cast<Int64Field>(i)) << ", "; | 237 << kernel->ref(static_cast<Int64Field>(i)) << ", "; |
| 238 } | 238 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 os << "TempFlags: "; | 273 os << "TempFlags: "; |
| 274 for (; i < BIT_TEMPS_END; ++i) { | 274 for (; i < BIT_TEMPS_END; ++i) { |
| 275 if (kernel->ref(static_cast<BitTemp>(i))) | 275 if (kernel->ref(static_cast<BitTemp>(i))) |
| 276 os << "#" << i - BIT_TEMPS_BEGIN << ", "; | 276 os << "#" << i - BIT_TEMPS_BEGIN << ", "; |
| 277 } | 277 } |
| 278 return os; | 278 return os; |
| 279 } | 279 } |
| 280 | 280 |
| 281 } // namespace syncable | 281 } // namespace syncable |
| 282 } // namespace syncer | 282 } // namespace syncer |
| OLD | NEW |