OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_MODEL_MODEL_TYPE_CHANGE_PROCESSOR_H_ | 5 #ifndef COMPONENTS_SYNC_MODEL_MODEL_TYPE_CHANGE_PROCESSOR_H_ |
6 #define COMPONENTS_SYNC_MODEL_MODEL_TYPE_CHANGE_PROCESSOR_H_ | 6 #define COMPONENTS_SYNC_MODEL_MODEL_TYPE_CHANGE_PROCESSOR_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "components/sync/base/model_type.h" | 13 #include "components/sync/base/model_type.h" |
14 #include "components/sync/engine/activation_context.h" | 14 #include "components/sync/engine/activation_context.h" |
15 #include "components/sync/model/entity_data.h" | 15 #include "components/sync/model/entity_data.h" |
16 #include "components/sync/model/model_error.h" | 16 #include "components/sync/model/model_error.h" |
17 | 17 |
18 namespace syncer { | 18 namespace syncer { |
19 | 19 |
20 class MetadataBatch; | 20 class MetadataBatch; |
21 class MetadataChangeList; | 21 class MetadataChangeList; |
22 class ModelTypeSyncBridge; | 22 class ModelTypeSyncBridge; |
23 | 23 |
24 // Interface used by the ModelTypeSyncBridge to inform sync of local changes. | 24 // Interface used by the ModelTypeSyncBridge to inform sync of local changes. |
25 class ModelTypeChangeProcessor { | 25 class ModelTypeChangeProcessor { |
26 public: | 26 public: |
27 typedef base::Callback<void(std::unique_ptr<ActivationContext>)> | 27 using StartCallback = |
28 StartCallback; | 28 base::Callback<void(std::unique_ptr<ActivationContext>)>; |
29 | 29 |
30 // A factory function to make an implementation of ModelTypeChangeProcessor. | 30 // A factory function to make an implementation of ModelTypeChangeProcessor. |
31 static std::unique_ptr<ModelTypeChangeProcessor> Create( | 31 static std::unique_ptr<ModelTypeChangeProcessor> Create( |
32 const base::RepeatingClosure& dump_stack, | 32 const base::RepeatingClosure& dump_stack, |
33 ModelType type, | 33 ModelType type, |
34 ModelTypeSyncBridge* bridge); | 34 ModelTypeSyncBridge* bridge); |
35 | 35 |
36 ModelTypeChangeProcessor(); | 36 ModelTypeChangeProcessor(); |
37 virtual ~ModelTypeChangeProcessor(); | 37 virtual ~ModelTypeChangeProcessor(); |
38 | 38 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 virtual void ReportError(const ModelError& error) = 0; | 83 virtual void ReportError(const ModelError& error) = 0; |
84 | 84 |
85 // A convenience form of the above. | 85 // A convenience form of the above. |
86 virtual void ReportError(const tracked_objects::Location& location, | 86 virtual void ReportError(const tracked_objects::Location& location, |
87 const std::string& message) = 0; | 87 const std::string& message) = 0; |
88 }; | 88 }; |
89 | 89 |
90 } // namespace syncer | 90 } // namespace syncer |
91 | 91 |
92 #endif // COMPONENTS_SYNC_MODEL_MODEL_TYPE_CHANGE_PROCESSOR_H_ | 92 #endif // COMPONENTS_SYNC_MODEL_MODEL_TYPE_CHANGE_PROCESSOR_H_ |
OLD | NEW |