| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_H_ |
| 6 #define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_H_ | 6 #define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <bitset> | 10 #include <bitset> |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 | 560 |
| 561 struct EntryKernelMutation { | 561 struct EntryKernelMutation { |
| 562 EntryKernel original, mutated; | 562 EntryKernel original, mutated; |
| 563 }; | 563 }; |
| 564 typedef std::map<int64, EntryKernelMutation> EntryKernelMutationMap; | 564 typedef std::map<int64, EntryKernelMutation> EntryKernelMutationMap; |
| 565 | 565 |
| 566 typedef browser_sync::Immutable<EntryKernelMutationMap> | 566 typedef browser_sync::Immutable<EntryKernelMutationMap> |
| 567 ImmutableEntryKernelMutationMap; | 567 ImmutableEntryKernelMutationMap; |
| 568 | 568 |
| 569 // Caller owns the return value. | 569 // Caller owns the return value. |
| 570 base::DictionaryValue* EntryKernelMutationToValue( |
| 571 const EntryKernelMutation& mutation); |
| 572 |
| 573 // Caller owns the return value. |
| 570 base::ListValue* EntryKernelMutationMapToValue( | 574 base::ListValue* EntryKernelMutationMapToValue( |
| 571 const EntryKernelMutationMap& mutations); | 575 const EntryKernelMutationMap& mutations); |
| 572 | 576 |
| 573 // How syncable indices & Indexers work. | 577 // How syncable indices & Indexers work. |
| 574 // | 578 // |
| 575 // The syncable Directory maintains several indices on the Entries it tracks. | 579 // The syncable Directory maintains several indices on the Entries it tracks. |
| 576 // The indices follow a common pattern: | 580 // The indices follow a common pattern: |
| 577 // (a) The index allows efficient lookup of an Entry* with particular | 581 // (a) The index allows efficient lookup of an Entry* with particular |
| 578 // field values. This is done by use of a std::set<> and a custom | 582 // field values. This is done by use of a std::set<> and a custom |
| 579 // comparator. | 583 // comparator. |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1190 | 1194 |
| 1191 // This is not a reset. It just sets the numeric fields which are not | 1195 // This is not a reset. It just sets the numeric fields which are not |
| 1192 // initialized by the constructor to zero. | 1196 // initialized by the constructor to zero. |
| 1193 void ZeroFields(EntryKernel* entry, int first_field); | 1197 void ZeroFields(EntryKernel* entry, int first_field); |
| 1194 | 1198 |
| 1195 } // namespace syncable | 1199 } // namespace syncable |
| 1196 | 1200 |
| 1197 std::ostream& operator <<(std::ostream&, const syncable::Blob&); | 1201 std::ostream& operator <<(std::ostream&, const syncable::Blob&); |
| 1198 | 1202 |
| 1199 #endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_H_ | 1203 #endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_H_ |
| OLD | NEW |