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

Side by Side Diff: sync/internal_api/public/activation_context.h

Issue 1678343002: [Sync] Moving DataTypeState to proto for serialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update for Pavel and merging with Max's changes. Created 4 years, 10 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 unified diff | Download patch
OLDNEW
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 SYNC_INTERNAL_API_PUBLIC_ACTIVATION_CONTEXT_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_ACTIVATION_CONTEXT_H_
6 #define SYNC_INTERNAL_API_PUBLIC_ACTIVATION_CONTEXT_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_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 "sync/base/sync_export.h" 11 #include "sync/base/sync_export.h"
12 #include "sync/internal_api/public/model_type_processor.h" 12 #include "sync/internal_api/public/model_type_processor.h"
13 #include "sync/internal_api/public/non_blocking_sync_common.h" 13 #include "sync/internal_api/public/non_blocking_sync_common.h"
14 #include "sync/protocol/data_type_state.pb.h"
14 15
15 namespace syncer_v2 { 16 namespace syncer_v2 {
16 17
17 // The state passed from ModelTypeProcessor to Sync thread during DataType 18 // The state passed from ModelTypeProcessor to Sync thread during DataType
18 // activation. 19 // activation.
19 struct SYNC_EXPORT ActivationContext { 20 struct SYNC_EXPORT ActivationContext {
20 ActivationContext(); 21 ActivationContext();
21 ~ActivationContext(); 22 ~ActivationContext();
22 23
23 // Initial DataTypeState at the moment of activation. 24 // Initial DataTypeState at the moment of activation.
24 DataTypeState data_type_state; 25 sync_pb::DataTypeState data_type_state;
25 26
26 // Pending updates from the previous session. 27 // Pending updates from the previous session.
27 // TODO(stanisc): crbug.com/529498: should remove pending updates. 28 // TODO(stanisc): crbug.com/529498: should remove pending updates.
28 UpdateResponseDataList saved_pending_updates; 29 UpdateResponseDataList saved_pending_updates;
29 30
30 // The ModelTypeProcessor for the worker. Note that this is owned because 31 // The ModelTypeProcessor for the worker. Note that this is owned because
31 // it is generally a proxy object to the real processor. 32 // it is generally a proxy object to the real processor.
32 scoped_ptr<ModelTypeProcessor> type_processor; 33 scoped_ptr<ModelTypeProcessor> type_processor;
33 }; 34 };
34 35
35 } // namespace syncer_v2 36 } // namespace syncer_v2
36 37
37 #endif // SYNC_INTERNAL_API_PUBLIC_ACTIVATION_CONTEXT_H_ 38 #endif // SYNC_INTERNAL_API_PUBLIC_ACTIVATION_CONTEXT_H_
OLDNEW
« no previous file with comments | « sync/engine/model_type_worker_unittest.cc ('k') | sync/internal_api/public/model_type_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698