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

Side by Side Diff: components/sync/core/processor_entity_tracker.h

Issue 2240613002: [Sync] Convert sync to a static library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try getting rid of sync_core source set. Created 4 years, 4 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
« no previous file with comments | « components/sync/core/non_blocking_sync_common.h ('k') | components/sync/core/read_node.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_CORE_PROCESSOR_ENTITY_TRACKER_H_ 5 #ifndef COMPONENTS_SYNC_CORE_PROCESSOR_ENTITY_TRACKER_H_
6 #define COMPONENTS_SYNC_CORE_PROCESSOR_ENTITY_TRACKER_H_ 6 #define COMPONENTS_SYNC_CORE_PROCESSOR_ENTITY_TRACKER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 12
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "components/sync/api/entity_data.h" 14 #include "components/sync/api/entity_data.h"
15 #include "components/sync/base/sync_export.h"
16 #include "components/sync/protocol/entity_metadata.pb.h" 15 #include "components/sync/protocol/entity_metadata.pb.h"
17 16
18 namespace syncer_v2 { 17 namespace syncer_v2 {
19 struct CommitRequestData; 18 struct CommitRequestData;
20 struct CommitResponseData; 19 struct CommitResponseData;
21 struct UpdateResponseData; 20 struct UpdateResponseData;
22 21
23 // This class is used by the SharedModelTypeProcessor to track the state of each 22 // This class is used by the SharedModelTypeProcessor to track the state of each
24 // entity with its type. It can be considered a helper class internal to the 23 // entity with its type. It can be considered a helper class internal to the
25 // processor. It manages the metadata for its entity and caches entity data 24 // processor. It manages the metadata for its entity and caches entity data
26 // upon a local change until commit confirmation is received. 25 // upon a local change until commit confirmation is received.
27 class SYNC_EXPORT ProcessorEntityTracker { 26 class ProcessorEntityTracker {
28 public: 27 public:
29 // Construct an instance representing a new locally-created item. 28 // Construct an instance representing a new locally-created item.
30 static std::unique_ptr<ProcessorEntityTracker> CreateNew( 29 static std::unique_ptr<ProcessorEntityTracker> CreateNew(
31 const std::string& client_tag, 30 const std::string& client_tag,
32 const std::string& client_tag_hash, 31 const std::string& client_tag_hash,
33 const std::string& id, 32 const std::string& id,
34 base::Time creation_time); 33 base::Time creation_time);
35 34
36 // Construct an instance representing an item loaded from storage on init. 35 // Construct an instance representing an item loaded from storage on init.
37 // This method swaps out the contents of |metadata|. 36 // This method swaps out the contents of |metadata|.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // The data is reset once commit confirmation is received. 144 // The data is reset once commit confirmation is received.
146 EntityDataPtr commit_data_; 145 EntityDataPtr commit_data_;
147 146
148 // The sequence number of the last item sent to the sync thread. 147 // The sequence number of the last item sent to the sync thread.
149 int64_t commit_requested_sequence_number_; 148 int64_t commit_requested_sequence_number_;
150 }; 149 };
151 150
152 } // namespace syncer_v2 151 } // namespace syncer_v2
153 152
154 #endif // COMPONENTS_SYNC_CORE_PROCESSOR_ENTITY_TRACKER_H_ 153 #endif // COMPONENTS_SYNC_CORE_PROCESSOR_ENTITY_TRACKER_H_
OLDNEW
« no previous file with comments | « components/sync/core/non_blocking_sync_common.h ('k') | components/sync/core/read_node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698