Chromium Code Reviews| Index: sync/engine/directory_update_handler.h |
| diff --git a/sync/engine/sync_directory_update_handler.h b/sync/engine/directory_update_handler.h |
| similarity index 76% |
| rename from sync/engine/sync_directory_update_handler.h |
| rename to sync/engine/directory_update_handler.h |
| index 2e4f33e54252f4edfea1cc36a7fc13f9355356e3..a451d69373b8be9649c66a2f5a7fb3c63e13c32a 100644 |
| --- a/sync/engine/sync_directory_update_handler.h |
| +++ b/sync/engine/directory_update_handler.h |
| @@ -2,8 +2,8 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef SYNC_ENGINE_SYNC_DIRECTORY_UPDATE_HANDLER_H_ |
| -#define SYNC_ENGINE_SYNC_DIRECTORY_UPDATE_HANDLER_H_ |
| +#ifndef SYNC_ENGINE_DIRECTORY_UPDATE_HANDLER_H_ |
| +#define SYNC_ENGINE_DIRECTORY_UPDATE_HANDLER_H_ |
| #include <map> |
| @@ -11,6 +11,7 @@ |
| #include "base/memory/ref_counted.h" |
| #include "sync/base/sync_export.h" |
| #include "sync/engine/process_updates_util.h" |
| +#include "sync/engine/update_handler.h" |
| #include "sync/internal_api/public/base/model_type.h" |
| #include "sync/internal_api/public/util/syncer_error.h" |
| @@ -37,16 +38,16 @@ class ModelSafeWorker; |
| // Each instance of this class represents a particular type in the |
| // syncable::Directory. It can store and retreive that type's progress markers. |
| // It can also process a set of received SyncEntities and store their data. |
| -class SYNC_EXPORT_PRIVATE SyncDirectoryUpdateHandler { |
| +class SYNC_EXPORT_PRIVATE DirectoryUpdateHandler : public UpdateHandler { |
| public: |
| - SyncDirectoryUpdateHandler(syncable::Directory* dir, |
| + DirectoryUpdateHandler(syncable::Directory* dir, |
| ModelType type, |
|
tim (not reviewing)
2014/02/18 19:15:01
nit - indent is off.
rlarocque
2014/02/18 20:01:13
Done.
|
| scoped_refptr<ModelSafeWorker> worker); |
| - ~SyncDirectoryUpdateHandler(); |
| + virtual ~DirectoryUpdateHandler() OVERRIDE; |
| // Fills the given parameter with the stored progress marker for this type. |
| - void GetDownloadProgress( |
| - sync_pb::DataTypeProgressMarker* progress_marker) const; |
| + virtual void GetDownloadProgress( |
| + sync_pb::DataTypeProgressMarker* progress_marker) const OVERRIDE; |
| // Processes the contents of a GetUpdates response message. |
| // |
| @@ -54,22 +55,22 @@ class SYNC_EXPORT_PRIVATE SyncDirectoryUpdateHandler { |
| // single GetUpdates response message. The progress marker's type must match |
| // this update handler's type, and the set of SyncEntities must include all |
| // entities of this type found in the response message. |
| - void ProcessGetUpdatesResponse( |
| + virtual void ProcessGetUpdatesResponse( |
| const sync_pb::DataTypeProgressMarker& progress_marker, |
| const SyncEntityList& applicable_updates, |
| - sessions::StatusController* status); |
| + sessions::StatusController* status) OVERRIDE; |
| // If there are updates to apply, apply them on the proper thread. |
| // Delegates to ApplyUpdatesImpl(). |
| - void ApplyUpdates(sessions::StatusController* status); |
| + virtual void ApplyUpdates(sessions::StatusController* status) OVERRIDE; |
| // Apply updates on the sync thread. This is for use during initial sync |
| // prior to model association. |
| - void PassiveApplyUpdates(sessions::StatusController* status); |
| + virtual void PassiveApplyUpdates(sessions::StatusController* status) OVERRIDE; |
| private: |
| - friend class SyncDirectoryUpdateHandlerApplyUpdateTest; |
| - friend class SyncDirectoryUpdateHandlerProcessUpdateTest; |
| + friend class DirectoryUpdateHandlerApplyUpdateTest; |
| + friend class DirectoryUpdateHandlerProcessUpdateTest; |
| // Sometimes there is nothing to do, so we can return without doing anything. |
| bool IsApplyUpdatesRequired(); |
| @@ -93,9 +94,9 @@ class SYNC_EXPORT_PRIVATE SyncDirectoryUpdateHandler { |
| ModelType type_; |
| scoped_refptr<ModelSafeWorker> worker_; |
| - DISALLOW_COPY_AND_ASSIGN(SyncDirectoryUpdateHandler); |
| + DISALLOW_COPY_AND_ASSIGN(DirectoryUpdateHandler); |
| }; |
| } // namespace syncer |
| -#endif // SYNC_ENGINE_SYNC_DIRECTORY_UPDATE_HANDLER_H_ |
| +#endif // SYNC_ENGINE_DIRECTORY_UPDATE_HANDLER_H_ |