| OLD | NEW | 
|---|
| 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 COMPONENTS_SYNC_ENGINE_IMPL_SYNC_MANAGER_IMPL_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_SYNC_MANAGER_IMPL_H_ | 
| 6 #define COMPONENTS_SYNC_ENGINE_IMPL_SYNC_MANAGER_IMPL_H_ | 6 #define COMPONENTS_SYNC_ENGINE_IMPL_SYNC_MANAGER_IMPL_H_ | 
| 7 | 7 | 
| 8 #include <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include <map> | 10 #include <map> | 
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 60  public: | 60  public: | 
| 61   // Create an uninitialized SyncManager.  Callers must Init() before using. | 61   // Create an uninitialized SyncManager.  Callers must Init() before using. | 
| 62   explicit SyncManagerImpl(const std::string& name); | 62   explicit SyncManagerImpl(const std::string& name); | 
| 63   ~SyncManagerImpl() override; | 63   ~SyncManagerImpl() override; | 
| 64 | 64 | 
| 65   // SyncManager implementation. | 65   // SyncManager implementation. | 
| 66   void Init(InitArgs* args) override; | 66   void Init(InitArgs* args) override; | 
| 67   ModelTypeSet InitialSyncEndedTypes() override; | 67   ModelTypeSet InitialSyncEndedTypes() override; | 
| 68   ModelTypeSet GetTypesWithEmptyProgressMarkerToken( | 68   ModelTypeSet GetTypesWithEmptyProgressMarkerToken( | 
| 69       ModelTypeSet types) override; | 69       ModelTypeSet types) override; | 
| 70   bool PurgePartiallySyncedTypes() override; | 70   void PurgePartiallySyncedTypes() override; | 
|  | 71   void PurgeDisabledTypes(ModelTypeSet to_purge, | 
|  | 72                           ModelTypeSet to_journal, | 
|  | 73                           ModelTypeSet to_unapply) override; | 
| 71   void UpdateCredentials(const SyncCredentials& credentials) override; | 74   void UpdateCredentials(const SyncCredentials& credentials) override; | 
| 72   void StartSyncingNormally(const ModelSafeRoutingInfo& routing_info, | 75   void StartSyncingNormally(const ModelSafeRoutingInfo& routing_info, | 
| 73                             base::Time last_poll_time) override; | 76                             base::Time last_poll_time) override; | 
| 74   void ConfigureSyncer(ConfigureReason reason, | 77   void ConfigureSyncer(ConfigureReason reason, | 
| 75                        ModelTypeSet to_download, | 78                        ModelTypeSet to_download, | 
| 76                        ModelTypeSet to_purge, |  | 
| 77                        ModelTypeSet to_journal, |  | 
| 78                        ModelTypeSet to_unapply, |  | 
| 79                        const ModelSafeRoutingInfo& new_routing_info, | 79                        const ModelSafeRoutingInfo& new_routing_info, | 
| 80                        const base::Closure& ready_task, | 80                        const base::Closure& ready_task, | 
| 81                        const base::Closure& retry_task) override; | 81                        const base::Closure& retry_task) override; | 
| 82   void SetInvalidatorEnabled(bool invalidator_enabled) override; | 82   void SetInvalidatorEnabled(bool invalidator_enabled) override; | 
| 83   void OnIncomingInvalidation( | 83   void OnIncomingInvalidation( | 
| 84       ModelType type, | 84       ModelType type, | 
| 85       std::unique_ptr<InvalidationInterface> invalidation) override; | 85       std::unique_ptr<InvalidationInterface> invalidation) override; | 
| 86   void AddObserver(SyncManager::Observer* observer) override; | 86   void AddObserver(SyncManager::Observer* observer) override; | 
| 87   void RemoveObserver(SyncManager::Observer* observer) override; | 87   void RemoveObserver(SyncManager::Observer* observer) override; | 
| 88   SyncStatus GetDetailedStatus() const override; | 88   SyncStatus GetDetailedStatus() const override; | 
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 212 | 212 | 
| 213   // Determine if any of the fields made visible to clients of the Sync API | 213   // Determine if any of the fields made visible to clients of the Sync API | 
| 214   // differ between the versions of an entry stored in |a| and |b|. A return | 214   // differ between the versions of an entry stored in |a| and |b|. A return | 
| 215   // value of false means that it should be OK to ignore this change. | 215   // value of false means that it should be OK to ignore this change. | 
| 216   bool VisiblePropertiesDiffer(const syncable::EntryKernelMutation& mutation, | 216   bool VisiblePropertiesDiffer(const syncable::EntryKernelMutation& mutation, | 
| 217                                Cryptographer* cryptographer) const; | 217                                Cryptographer* cryptographer) const; | 
| 218 | 218 | 
| 219   // Open the directory named with |username|. | 219   // Open the directory named with |username|. | 
| 220   bool OpenDirectory(const std::string& username); | 220   bool OpenDirectory(const std::string& username); | 
| 221 | 221 | 
| 222   // Purge those disabled types as specified by |to_purge|. |to_journal| and |  | 
| 223   // |to_unapply| specify subsets that require special handling. |to_journal| |  | 
| 224   // types are saved into the delete journal, while |to_unapply| have only |  | 
| 225   // their local data deleted, while their server data is preserved. |  | 
| 226   bool PurgeDisabledTypes(ModelTypeSet to_purge, |  | 
| 227                           ModelTypeSet to_journal, |  | 
| 228                           ModelTypeSet to_unapply); |  | 
| 229 |  | 
| 230   void RequestNudgeForDataTypes(const tracked_objects::Location& nudge_location, | 222   void RequestNudgeForDataTypes(const tracked_objects::Location& nudge_location, | 
| 231                                 ModelTypeSet type); | 223                                 ModelTypeSet type); | 
| 232 | 224 | 
| 233   // If this is a deletion for a password, sets the legacy | 225   // If this is a deletion for a password, sets the legacy | 
| 234   // ExtraPasswordChangeRecordData field of |buffer|. Otherwise sets | 226   // ExtraPasswordChangeRecordData field of |buffer|. Otherwise sets | 
| 235   // |buffer|'s specifics field to contain the unencrypted data. | 227   // |buffer|'s specifics field to contain the unencrypted data. | 
| 236   void SetExtraChangeRecordData(int64_t id, | 228   void SetExtraChangeRecordData(int64_t id, | 
| 237                                 ModelType type, | 229                                 ModelType type, | 
| 238                                 ChangeReorderBuffer* buffer, | 230                                 ChangeReorderBuffer* buffer, | 
| 239                                 Cryptographer* cryptographer, | 231                                 Cryptographer* cryptographer, | 
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 331   std::unique_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; | 323   std::unique_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; | 
| 332 | 324 | 
| 333   base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; | 325   base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; | 
| 334 | 326 | 
| 335   DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 327   DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 
| 336 }; | 328 }; | 
| 337 | 329 | 
| 338 }  // namespace syncer | 330 }  // namespace syncer | 
| 339 | 331 | 
| 340 #endif  // COMPONENTS_SYNC_ENGINE_IMPL_SYNC_MANAGER_IMPL_H_ | 332 #endif  // COMPONENTS_SYNC_ENGINE_IMPL_SYNC_MANAGER_IMPL_H_ | 
| OLD | NEW | 
|---|