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