OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_DRIVER_BACKEND_DATA_TYPE_CONFIGURER_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_BACKEND_DATA_TYPE_CONFIGURER_H_ |
6 #define COMPONENTS_SYNC_DRIVER_BACKEND_DATA_TYPE_CONFIGURER_H_ | 6 #define COMPONENTS_SYNC_DRIVER_BACKEND_DATA_TYPE_CONFIGURER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "sync/internal_api/public/base/model_type.h" | 11 #include "sync/internal_api/public/base/model_type.h" |
12 #include "sync/internal_api/public/configure_reason.h" | 12 #include "sync/internal_api/public/configure_reason.h" |
13 #include "sync/internal_api/public/engine/model_safe_worker.h" | 13 #include "sync/internal_api/public/engine/model_safe_worker.h" |
14 | 14 |
15 namespace browser_sync { | 15 namespace sync_driver { |
16 | 16 |
17 class ChangeProcessor; | 17 class ChangeProcessor; |
18 | 18 |
19 // The DataTypeConfigurer interface abstracts out the action of | 19 // The DataTypeConfigurer interface abstracts out the action of |
20 // configuring a set of new data types and cleaning up after a set of | 20 // configuring a set of new data types and cleaning up after a set of |
21 // removed data types. | 21 // removed data types. |
22 class BackendDataTypeConfigurer { | 22 class BackendDataTypeConfigurer { |
23 public: | 23 public: |
24 enum DataTypeConfigState { | 24 enum DataTypeConfigState { |
25 CONFIGURE_ACTIVE, // Actively being configured. Data of such types | 25 CONFIGURE_ACTIVE, // Actively being configured. Data of such types |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 // Set state of |types| in |state_map| to |state|. | 73 // Set state of |types| in |state_map| to |state|. |
74 static void SetDataTypesState(DataTypeConfigState state, | 74 static void SetDataTypesState(DataTypeConfigState state, |
75 syncer::ModelTypeSet types, | 75 syncer::ModelTypeSet types, |
76 DataTypeConfigStateMap* state_map); | 76 DataTypeConfigStateMap* state_map); |
77 | 77 |
78 protected: | 78 protected: |
79 virtual ~BackendDataTypeConfigurer() {} | 79 virtual ~BackendDataTypeConfigurer() {} |
80 }; | 80 }; |
81 | 81 |
82 } // namespace browser_sync | 82 } // namespace sync_driver |
83 | 83 |
84 #endif // COMPONENTS_SYNC_DRIVER_BACKEND_DATA_TYPE_CONFIGURER_H_ | 84 #endif // COMPONENTS_SYNC_DRIVER_BACKEND_DATA_TYPE_CONFIGURER_H_ |
OLD | NEW |