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

Unified Diff: components/sync/driver/data_type_controller.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
« no previous file with comments | « components/sync/driver/change_processor_mock.cc ('k') | components/sync/driver/data_type_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/data_type_controller.h
diff --git a/components/sync/driver/data_type_controller.h b/components/sync/driver/data_type_controller.h
index 437c87301064129c1cd83939f3b280d8dc2b3913..d3ab89d9642ff232a0a913dadab98408dade2865 100644
--- a/components/sync/driver/data_type_controller.h
+++ b/components/sync/driver/data_type_controller.h
@@ -18,12 +18,10 @@
#include "components/sync/base/unrecoverable_error_handler.h"
namespace syncer {
-class SyncError;
-class SyncMergeResult;
-}
-namespace sync_driver {
class BackendDataTypeConfigurer;
+class SyncError;
+class SyncMergeResult;
// DataTypeControllers are responsible for managing the state of a single data
// type. They are not thread safe and should only be used on the UI thread.
@@ -62,21 +60,18 @@ class DataTypeController : public base::SupportsWeakPtr<DataTypeController> {
MAX_CONFIGURE_RESULT
};
- typedef base::Callback<void(ConfigureResult,
- const syncer::SyncMergeResult&,
- const syncer::SyncMergeResult&)>
+ typedef base::Callback<
+ void(ConfigureResult, const SyncMergeResult&, const SyncMergeResult&)>
StartCallback;
- typedef base::Callback<void(syncer::ModelType, const syncer::SyncError&)>
- ModelLoadCallback;
+ typedef base::Callback<void(ModelType, const SyncError&)> ModelLoadCallback;
- typedef base::Callback<void(const syncer::ModelType,
+ typedef base::Callback<void(const ModelType,
std::unique_ptr<base::ListValue>)>
AllNodesCallback;
- typedef std::map<syncer::ModelType, std::unique_ptr<DataTypeController>>
- TypeMap;
- typedef std::map<syncer::ModelType, DataTypeController::State> StateMap;
+ typedef std::map<ModelType, std::unique_ptr<DataTypeController>> TypeMap;
+ typedef std::map<ModelType, DataTypeController::State> StateMap;
// Returns true if the start result should trigger an unrecoverable error.
// Public so unit tests can use this function as well.
@@ -137,7 +132,7 @@ class DataTypeController : public base::SupportsWeakPtr<DataTypeController> {
virtual State state() const = 0;
// Unique model type for this data type controller.
- syncer::ModelType type() const { return type_; }
+ ModelType type() const { return type_; }
// Whether the DataTypeController is ready to start. This is useful if the
// datatype itself must make the decision about whether it should be enabled
@@ -152,11 +147,10 @@ class DataTypeController : public base::SupportsWeakPtr<DataTypeController> {
virtual void GetAllNodes(const AllNodesCallback& callback) = 0;
protected:
- DataTypeController(syncer::ModelType type, const base::Closure& dump_stack);
+ DataTypeController(ModelType type, const base::Closure& dump_stack);
// Create an error handler that reports back to this controller.
- virtual std::unique_ptr<syncer::DataTypeErrorHandler>
- CreateErrorHandler() = 0;
+ virtual std::unique_ptr<DataTypeErrorHandler> CreateErrorHandler() = 0;
// Allows subclasses to DCHECK that they're on the correct thread.
bool CalledOnValidThread() const;
@@ -166,12 +160,12 @@ class DataTypeController : public base::SupportsWeakPtr<DataTypeController> {
private:
// The type this object is responsible for controlling.
- const syncer::ModelType type_;
+ const ModelType type_;
// Used to check that functions are called on the correct thread.
base::ThreadChecker thread_checker_;
};
-} // namespace sync_driver
+} // namespace syncer
#endif // COMPONENTS_SYNC_DRIVER_DATA_TYPE_CONTROLLER_H__
« no previous file with comments | « components/sync/driver/change_processor_mock.cc ('k') | components/sync/driver/data_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698