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

Side by Side Diff: sync/internal_api/sync_manager_impl.h

Issue 11341048: Populate versions on individual nodes in sync model and native bookmark model. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « sync/internal_api/public/write_transaction.h ('k') | sync/internal_api/sync_manager_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_ 5 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_
6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ 6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // This listener is called upon completion of a syncable transaction, and 158 // This listener is called upon completion of a syncable transaction, and
159 // builds the list of sync-engine initiated changes that will be forwarded to 159 // builds the list of sync-engine initiated changes that will be forwarded to
160 // the SyncManager's Observers. 160 // the SyncManager's Observers.
161 virtual void HandleTransactionCompleteChangeEvent( 161 virtual void HandleTransactionCompleteChangeEvent(
162 ModelTypeSet models_with_changes) OVERRIDE; 162 ModelTypeSet models_with_changes) OVERRIDE;
163 virtual ModelTypeSet HandleTransactionEndingChangeEvent( 163 virtual ModelTypeSet HandleTransactionEndingChangeEvent(
164 const syncable::ImmutableWriteTransactionInfo& write_transaction_info, 164 const syncable::ImmutableWriteTransactionInfo& write_transaction_info,
165 syncable::BaseTransaction* trans) OVERRIDE; 165 syncable::BaseTransaction* trans) OVERRIDE;
166 virtual void HandleCalculateChangesChangeEventFromSyncApi( 166 virtual void HandleCalculateChangesChangeEventFromSyncApi(
167 const syncable::ImmutableWriteTransactionInfo& write_transaction_info, 167 const syncable::ImmutableWriteTransactionInfo& write_transaction_info,
168 syncable::BaseTransaction* trans) OVERRIDE; 168 syncable::BaseTransaction* trans,
169 std::vector<int64>* entries_changed) OVERRIDE;
169 virtual void HandleCalculateChangesChangeEventFromSyncer( 170 virtual void HandleCalculateChangesChangeEventFromSyncer(
170 const syncable::ImmutableWriteTransactionInfo& write_transaction_info, 171 const syncable::ImmutableWriteTransactionInfo& write_transaction_info,
171 syncable::BaseTransaction* trans) OVERRIDE; 172 syncable::BaseTransaction* trans,
173 std::vector<int64>* entries_changed) OVERRIDE;
172 174
173 // InvalidationHandler implementation. 175 // InvalidationHandler implementation.
174 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE; 176 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE;
175 virtual void OnIncomingInvalidation( 177 virtual void OnIncomingInvalidation(
176 const ObjectIdInvalidationMap& invalidation_map, 178 const ObjectIdInvalidationMap& invalidation_map,
177 IncomingInvalidationSource source) OVERRIDE; 179 IncomingInvalidationSource source) OVERRIDE;
178 180
179 // These OnYYYChanged() methods are only called by our NetworkChangeNotifier. 181 // These OnYYYChanged() methods are only called by our NetworkChangeNotifier.
180 // Called when IP address of primary interface changes. 182 // Called when IP address of primary interface changes.
181 virtual void OnIPAddressChanged() OVERRIDE; 183 virtual void OnIPAddressChanged() OVERRIDE;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 bool VisiblePositionsDiffer( 222 bool VisiblePositionsDiffer(
221 const syncable::EntryKernelMutation& mutation) const; 223 const syncable::EntryKernelMutation& mutation) const;
222 224
223 // Determine if any of the fields made visible to clients of the Sync API 225 // Determine if any of the fields made visible to clients of the Sync API
224 // differ between the versions of an entry stored in |a| and |b|. A return 226 // differ between the versions of an entry stored in |a| and |b|. A return
225 // value of false means that it should be OK to ignore this change. 227 // value of false means that it should be OK to ignore this change.
226 bool VisiblePropertiesDiffer( 228 bool VisiblePropertiesDiffer(
227 const syncable::EntryKernelMutation& mutation, 229 const syncable::EntryKernelMutation& mutation,
228 Cryptographer* cryptographer) const; 230 Cryptographer* cryptographer) const;
229 231
230 bool ChangeBuffersAreEmpty();
231
232 // Open the directory named with username_for_share 232 // Open the directory named with username_for_share
233 bool OpenDirectory(); 233 bool OpenDirectory();
234 234
235 // Purge those types from |previously_enabled_types| that are no longer 235 // Purge those types from |previously_enabled_types| that are no longer
236 // enabled in |currently_enabled_types|. 236 // enabled in |currently_enabled_types|.
237 bool PurgeDisabledTypes(ModelTypeSet previously_enabled_types, 237 bool PurgeDisabledTypes(ModelTypeSet previously_enabled_types,
238 ModelTypeSet currently_enabled_types); 238 ModelTypeSet currently_enabled_types);
239 239
240 void RequestNudgeForDataTypes( 240 void RequestNudgeForDataTypes(
241 const tracked_objects::Location& nudge_location, 241 const tracked_objects::Location& nudge_location,
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 // Start()ed. 328 // Start()ed.
329 scoped_ptr<SyncScheduler> scheduler_; 329 scoped_ptr<SyncScheduler> scheduler_;
330 330
331 // The Invalidator which notifies us when updates need to be downloaded. 331 // The Invalidator which notifies us when updates need to be downloaded.
332 scoped_ptr<Invalidator> invalidator_; 332 scoped_ptr<Invalidator> invalidator_;
333 333
334 // A multi-purpose status watch object that aggregates stats from various 334 // A multi-purpose status watch object that aggregates stats from various
335 // sync components. 335 // sync components.
336 AllStatus allstatus_; 336 AllStatus allstatus_;
337 337
338 // Each element of this array is a store of change records produced by 338 // Each element of this map is a store of change records produced by
339 // HandleChangeEvent during the CALCULATE_CHANGES step. The changes are 339 // HandleChangeEventFromSyncer during the CALCULATE_CHANGES step. The changes
340 // segregated by model type, and are stored here to be processed and 340 // are grouped by model type, and are stored here in tree order to be
341 // forwarded to the observer slightly later, at the TRANSACTION_ENDING 341 // forwarded to the observer slightly later, at the TRANSACTION_ENDING step
342 // step by HandleTransactionEndingChangeEvent. The list is cleared in the 342 // by HandleTransactionEndingChangeEvent. The list is cleared after observer
343 // TRANSACTION_COMPLETE step by HandleTransactionCompleteChangeEvent. 343 // finishes processing.
344 ChangeReorderBuffer change_buffers_[MODEL_TYPE_COUNT]; 344 typedef std::map<int, ImmutableChangeRecordList> ChangeRecordMap;
345 ChangeRecordMap change_records_;
345 346
346 SyncManager::ChangeDelegate* change_delegate_; 347 SyncManager::ChangeDelegate* change_delegate_;
347 348
348 // Set to true once Init has been called. 349 // Set to true once Init has been called.
349 bool initialized_; 350 bool initialized_;
350 351
351 bool observing_network_connectivity_changes_; 352 bool observing_network_connectivity_changes_;
352 353
353 InvalidatorState invalidator_state_; 354 InvalidatorState invalidator_state_;
354 355
(...skipping 23 matching lines...) Expand all
378 // changing passphrases, and in general handles sync-specific interactions 379 // changing passphrases, and in general handles sync-specific interactions
379 // with the cryptographer. 380 // with the cryptographer.
380 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; 381 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_;
381 382
382 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); 383 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl);
383 }; 384 };
384 385
385 } // namespace syncer 386 } // namespace syncer
386 387
387 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ 388 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/write_transaction.h ('k') | sync/internal_api/sync_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698