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_CORE_ACTIVATION_CONTEXT_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_ACTIVATION_CONTEXT_H_ |
6 #define COMPONENTS_SYNC_CORE_ACTIVATION_CONTEXT_H_ | 6 #define COMPONENTS_SYNC_ENGINE_ACTIVATION_CONTEXT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/sequenced_task_runner.h" | 12 #include "base/sequenced_task_runner.h" |
13 #include "components/sync/core/model_type_processor.h" | 13 #include "components/sync/engine/model_type_processor.h" |
14 #include "components/sync/core/non_blocking_sync_common.h" | 14 #include "components/sync/engine/non_blocking_sync_common.h" |
15 #include "components/sync/protocol/model_type_state.pb.h" | 15 #include "components/sync/protocol/model_type_state.pb.h" |
16 | 16 |
17 namespace syncer { | 17 namespace syncer { |
18 | 18 |
19 // The state passed from ModelTypeProcessor to Sync thread during DataType | 19 // The state passed from ModelTypeProcessor to Sync thread during DataType |
20 // activation. | 20 // activation. |
21 struct ActivationContext { | 21 struct ActivationContext { |
22 ActivationContext(); | 22 ActivationContext(); |
23 ~ActivationContext(); | 23 ~ActivationContext(); |
24 | 24 |
25 // Initial ModelTypeState at the moment of activation. | 25 // Initial ModelTypeState at the moment of activation. |
26 sync_pb::ModelTypeState model_type_state; | 26 sync_pb::ModelTypeState model_type_state; |
27 | 27 |
28 // The ModelTypeProcessor for the worker. Note that this is owned because | 28 // The ModelTypeProcessor for the worker. Note that this is owned because |
29 // it is generally a proxy object to the real processor. | 29 // it is generally a proxy object to the real processor. |
30 std::unique_ptr<ModelTypeProcessor> type_processor; | 30 std::unique_ptr<ModelTypeProcessor> type_processor; |
31 }; | 31 }; |
32 | 32 |
33 } // namespace syncer | 33 } // namespace syncer |
34 | 34 |
35 #endif // COMPONENTS_SYNC_CORE_ACTIVATION_CONTEXT_H_ | 35 #endif // COMPONENTS_SYNC_ENGINE_ACTIVATION_CONTEXT_H_ |
OLD | NEW |