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

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

Issue 17552014: [Sync] Have SBH tell SyncManager which types to purge (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix dchecks Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 virtual void UnregisterInvalidationHandler( 98 virtual void UnregisterInvalidationHandler(
99 InvalidationHandler* handler) OVERRIDE; 99 InvalidationHandler* handler) OVERRIDE;
100 virtual void AcknowledgeInvalidation( 100 virtual void AcknowledgeInvalidation(
101 const invalidation::ObjectId& id, 101 const invalidation::ObjectId& id,
102 const syncer::AckHandle& ack_handle) OVERRIDE; 102 const syncer::AckHandle& ack_handle) OVERRIDE;
103 virtual void StartSyncingNormally( 103 virtual void StartSyncingNormally(
104 const ModelSafeRoutingInfo& routing_info) OVERRIDE; 104 const ModelSafeRoutingInfo& routing_info) OVERRIDE;
105 virtual void ConfigureSyncer( 105 virtual void ConfigureSyncer(
106 ConfigureReason reason, 106 ConfigureReason reason,
107 ModelTypeSet to_download, 107 ModelTypeSet to_download,
108 ModelTypeSet to_purge,
108 ModelTypeSet to_journal, 109 ModelTypeSet to_journal,
109 ModelTypeSet to_unapply, 110 ModelTypeSet to_unapply,
110 ModelTypeSet to_ignore,
111 const ModelSafeRoutingInfo& new_routing_info, 111 const ModelSafeRoutingInfo& new_routing_info,
112 const base::Closure& ready_task, 112 const base::Closure& ready_task,
113 const base::Closure& retry_task) OVERRIDE; 113 const base::Closure& retry_task) OVERRIDE;
114 virtual void AddObserver(SyncManager::Observer* observer) OVERRIDE; 114 virtual void AddObserver(SyncManager::Observer* observer) OVERRIDE;
115 virtual void RemoveObserver(SyncManager::Observer* observer) OVERRIDE; 115 virtual void RemoveObserver(SyncManager::Observer* observer) OVERRIDE;
116 virtual SyncStatus GetDetailedStatus() const OVERRIDE; 116 virtual SyncStatus GetDetailedStatus() const OVERRIDE;
117 virtual void SaveChanges() OVERRIDE; 117 virtual void SaveChanges() OVERRIDE;
118 virtual void StopSyncingForShutdown(const base::Closure& callback) OVERRIDE; 118 virtual void StopSyncingForShutdown(const base::Closure& callback) OVERRIDE;
119 virtual void ShutdownOnSyncThread() OVERRIDE; 119 virtual void ShutdownOnSyncThread() OVERRIDE;
120 virtual UserShare* GetUserShare() OVERRIDE; 120 virtual UserShare* GetUserShare() OVERRIDE;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 // Determine if any of the fields made visible to clients of the Sync API 233 // Determine if any of the fields made visible to clients of the Sync API
234 // differ between the versions of an entry stored in |a| and |b|. A return 234 // differ between the versions of an entry stored in |a| and |b|. A return
235 // value of false means that it should be OK to ignore this change. 235 // value of false means that it should be OK to ignore this change.
236 bool VisiblePropertiesDiffer( 236 bool VisiblePropertiesDiffer(
237 const syncable::EntryKernelMutation& mutation, 237 const syncable::EntryKernelMutation& mutation,
238 Cryptographer* cryptographer) const; 238 Cryptographer* cryptographer) const;
239 239
240 // Open the directory named with |username|. 240 // Open the directory named with |username|.
241 bool OpenDirectory(const std::string& username); 241 bool OpenDirectory(const std::string& username);
242 242
243 // Purge those types from |previously_enabled_types| that are no longer 243 // Purge those disabled types as specified by |to_purge|. |to_journal| and
244 // enabled in |currently_enabled_types|. |to_journal| and |to_unapply| 244 // |to_unapply| specify subsets that require special handling. |to_journal|
245 // specify types that require special handling. |to_journal| types are saved 245 // types are saved into the delete journal, while |to_unapply| have only
246 // into the delete journal, while |to_unapply| have only their local data 246 // their local data deleted, while their server data is preserved.
247 // deleted, while their server data is preserved. 247 bool PurgeDisabledTypes(ModelTypeSet to_purge,
248 bool PurgeDisabledTypes(ModelTypeSet previously_enabled_types,
249 ModelTypeSet currently_enabled_types,
250 ModelTypeSet to_journal, 248 ModelTypeSet to_journal,
251 ModelTypeSet to_unapply); 249 ModelTypeSet to_unapply);
252 250
253 void RequestNudgeForDataTypes( 251 void RequestNudgeForDataTypes(
254 const tracked_objects::Location& nudge_location, 252 const tracked_objects::Location& nudge_location,
255 ModelTypeSet type); 253 ModelTypeSet type);
256 254
257 // If this is a deletion for a password, sets the legacy 255 // If this is a deletion for a password, sets the legacy
258 // ExtraPasswordChangeRecordData field of |buffer|. Otherwise sets 256 // ExtraPasswordChangeRecordData field of |buffer|. Otherwise sets
259 // |buffer|'s specifics field to contain the unencrypted data. 257 // |buffer|'s specifics field to contain the unencrypted data.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 // changing passphrases, and in general handles sync-specific interactions 386 // changing passphrases, and in general handles sync-specific interactions
389 // with the cryptographer. 387 // with the cryptographer.
390 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; 388 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_;
391 389
392 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); 390 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl);
393 }; 391 };
394 392
395 } // namespace syncer 393 } // namespace syncer
396 394
397 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ 395 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/test/fake_sync_manager.h ('k') | sync/internal_api/sync_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698