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

Unified Diff: components/sync/core/shared_model_type_processor.h

Issue 2388163002: [Sync] Move //components/sync to the syncer namespace, take 2. (Closed)
Patch Set: Rebase. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: components/sync/core/shared_model_type_processor.h
diff --git a/components/sync/core/shared_model_type_processor.h b/components/sync/core/shared_model_type_processor.h
index 4be1558bcfaf07f1b3f3c937916449c769017945..a8740bece2ded1a149a500cf27d7c2343e8e2c0d 100644
--- a/components/sync/core/shared_model_type_processor.h
+++ b/components/sync/core/shared_model_type_processor.h
@@ -25,7 +25,7 @@
#include "components/sync/protocol/data_type_state.pb.h"
#include "components/sync/protocol/sync.pb.h"
-namespace syncer_v2 {
+namespace syncer {
struct ActivationContext;
class CommitQueue;
class ProcessorEntityTracker;
@@ -36,12 +36,12 @@ class SharedModelTypeProcessor : public ModelTypeProcessor,
public ModelTypeChangeProcessor,
base::NonThreadSafe {
public:
- SharedModelTypeProcessor(syncer::ModelType type, ModelTypeService* service);
+ SharedModelTypeProcessor(ModelType type, ModelTypeService* service);
~SharedModelTypeProcessor() override;
// An easily bound function that constructs a SharedModelTypeProcessor.
static std::unique_ptr<ModelTypeChangeProcessor> CreateAsChangeProcessor(
- syncer::ModelType type,
+ ModelType type,
ModelTypeService* service);
// Whether the processor is allowing changes to its model type. If this is
@@ -57,7 +57,7 @@ class SharedModelTypeProcessor : public ModelTypeProcessor,
// TODO(gangwu): GetAllNodes could be in a helper class.
void GetAllNodes(
const scoped_refptr<base::TaskRunner>& task_runner,
- const base::Callback<void(const syncer::ModelType type,
+ const base::Callback<void(const ModelType type,
std::unique_ptr<base::ListValue>)>& callback);
// ModelTypeChangeProcessor implementation.
@@ -66,15 +66,13 @@ class SharedModelTypeProcessor : public ModelTypeProcessor,
MetadataChangeList* metadata_change_list) override;
void Delete(const std::string& storage_key,
MetadataChangeList* metadata_change_list) override;
- void OnMetadataLoaded(syncer::SyncError error,
+ void OnMetadataLoaded(SyncError error,
std::unique_ptr<MetadataBatch> batch) override;
- void OnSyncStarting(
- std::unique_ptr<syncer::DataTypeErrorHandler> error_handler,
- const StartCallback& callback) override;
+ void OnSyncStarting(std::unique_ptr<DataTypeErrorHandler> error_handler,
+ const StartCallback& callback) override;
void DisableSync() override;
- syncer::SyncError CreateAndUploadError(
- const tracked_objects::Location& location,
- const std::string& message) override;
+ SyncError CreateAndUploadError(const tracked_objects::Location& location,
+ const std::string& message) override;
// ModelTypeProcessor implementation.
void ConnectSync(std::unique_ptr<CommitQueue> worker) override;
@@ -114,11 +112,11 @@ class SharedModelTypeProcessor : public ModelTypeProcessor,
const UpdateResponseDataList& updates);
// ModelTypeService::GetData() callback for initial pending commit data.
- void OnInitialPendingDataLoaded(syncer::SyncError error,
+ void OnInitialPendingDataLoaded(SyncError error,
std::unique_ptr<DataBatch> data_batch);
// ModelTypeService::GetData() callback for re-encryption commit data.
- void OnDataLoadedForReEncryption(syncer::SyncError error,
+ void OnDataLoadedForReEncryption(SyncError error,
std::unique_ptr<DataBatch> data_batch);
// Caches EntityData from the |data_batch| in the entity trackers.
@@ -156,12 +154,12 @@ class SharedModelTypeProcessor : public ModelTypeProcessor,
// will merge real data |batch| with metadata, then pass to |callback|.
void MergeDataWithMetadata(
const scoped_refptr<base::TaskRunner>& task_runner,
- const base::Callback<void(const syncer::ModelType,
+ const base::Callback<void(const ModelType,
std::unique_ptr<base::ListValue>)>& callback,
- syncer::SyncError error,
+ SyncError error,
std::unique_ptr<DataBatch> batch);
- const syncer::ModelType type_;
+ const ModelType type_;
sync_pb::DataTypeState data_type_state_;
// Stores the start callback in between OnSyncStarting() and ReadyToConnect().
@@ -169,7 +167,7 @@ class SharedModelTypeProcessor : public ModelTypeProcessor,
// A cache for any error that may occur during startup and should be passed
// into the |start_callback_|.
- syncer::SyncError start_error_;
+ SyncError start_error_;
// Indicates whether the metadata has finished loading.
bool is_metadata_loaded_;
@@ -202,12 +200,12 @@ class SharedModelTypeProcessor : public ModelTypeProcessor,
// The object used for informing sync of errors; will be non-null after
// OnSyncStarting has been called. This pointer is not owned.
- std::unique_ptr<syncer::DataTypeErrorHandler> error_handler_;
+ std::unique_ptr<DataTypeErrorHandler> error_handler_;
// WeakPtrFactory for this processor which will be sent to sync thread.
base::WeakPtrFactory<SharedModelTypeProcessor> weak_ptr_factory_;
};
-} // namespace syncer_v2
+} // namespace syncer
#endif // COMPONENTS_SYNC_CORE_SHARED_MODEL_TYPE_PROCESSOR_H_
« no previous file with comments | « components/sync/core/processor_entity_tracker_unittest.cc ('k') | components/sync/core/shared_model_type_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698