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

Side by Side Diff: components/sync/engine_impl/worker_entity_tracker.h

Issue 2339403004: [Sync] Add two more USS integration tests. (Closed)
Patch Set: Created 4 years, 3 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 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_ENGINE_IMPL_WORKER_ENTITY_TRACKER_H_ 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_WORKER_ENTITY_TRACKER_H_
6 #define COMPONENTS_SYNC_ENGINE_IMPL_WORKER_ENTITY_TRACKER_H_ 6 #define COMPONENTS_SYNC_ENGINE_IMPL_WORKER_ENTITY_TRACKER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // Updates this entity with data from the latest version that the 49 // Updates this entity with data from the latest version that the
50 // model asked us to commit. May clobber state related to the 50 // model asked us to commit. May clobber state related to the
51 // model's previous commit attempt(s). 51 // model's previous commit attempt(s).
52 void RequestCommit(const CommitRequestData& data); 52 void RequestCommit(const CommitRequestData& data);
53 53
54 // Tracks the receipt of a commit response and fills in some local-only data 54 // Tracks the receipt of a commit response and fills in some local-only data
55 // on it to be passed back to the processor. 55 // on it to be passed back to the processor.
56 void ReceiveCommitResponse(CommitResponseData* ack); 56 void ReceiveCommitResponse(CommitResponseData* ack);
57 57
58 // Handles receipt of an update from the server. 58 // Handles receipt of an update from the server.
59 void ReceiveUpdate(int64_t version); 59 void ReceiveUpdate(const UpdateResponseData& update);
60 60
61 // Handles the receipt of an encrypted update from the server. 61 // Handles the receipt of an encrypted update from the server.
62 // 62 //
63 // Returns true if the tracker decides this item is worth keeping. Returns 63 // Returns true if the tracker decides this item is worth keeping. Returns
64 // false if the item is discarded, which could happen if the version number 64 // false if the item is discarded, which could happen if the version number
65 // is out of date. 65 // is out of date.
66 bool ReceiveEncryptedUpdate(const UpdateResponseData& data); 66 bool ReceiveEncryptedUpdate(const UpdateResponseData& data);
67 67
68 // Functions to fetch the latest encrypted update. 68 // Functions to fetch the latest encrypted update.
69 bool HasEncryptedUpdate() const; 69 bool HasEncryptedUpdate() const;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // of an pending update prevents commits. As of this writing, the only 118 // of an pending update prevents commits. As of this writing, the only
119 // source of pending updates is updates that can't currently be decrypted. 119 // source of pending updates is updates that can't currently be decrypted.
120 std::unique_ptr<UpdateResponseData> encrypted_update_; 120 std::unique_ptr<UpdateResponseData> encrypted_update_;
121 121
122 DISALLOW_COPY_AND_ASSIGN(WorkerEntityTracker); 122 DISALLOW_COPY_AND_ASSIGN(WorkerEntityTracker);
123 }; 123 };
124 124
125 } // namespace syncer_v2 125 } // namespace syncer_v2
126 126
127 #endif // COMPONENTS_SYNC_ENGINE_IMPL_WORKER_ENTITY_TRACKER_H_ 127 #endif // COMPONENTS_SYNC_ENGINE_IMPL_WORKER_ENTITY_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698