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

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

Issue 2328393002: [Sync] Add a sanity integration test for USS. (Closed)
Patch Set: Rebase. 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
70 UpdateResponseData GetEncryptedUpdate() const; 70 UpdateResponseData GetEncryptedUpdate() const;
71 71
72 // Clears the encrypted update. Allows us to resume regular commit behavior. 72 // Clears the encrypted update. Allows us to resume regular commit behavior.
73 void ClearEncryptedUpdate(); 73 void ClearEncryptedUpdate();
74 74
75 const std::string& id() const { return id_; }
76 const std::string& client_tag_hash() const { return client_tag_hash_; }
77
75 private: 78 private:
76 // Checks if the current state indicates a conflict. 79 // Checks if the current state indicates a conflict.
77 // 80 //
78 // This can be true only while a call to this object is in progress. 81 // This can be true only while a call to this object is in progress.
79 // Conflicts are always cleared before the method call ends. 82 // Conflicts are always cleared before the method call ends.
80 bool IsInConflict() const; 83 bool IsInConflict() const;
81 84
82 // Checks if the server knows about this item. 85 // Checks if the server knows about this item.
83 bool IsServerKnown() const; 86 bool IsServerKnown() const;
84 87
(...skipping 30 matching lines...) Expand all
115 // 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
116 // 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.
117 std::unique_ptr<UpdateResponseData> encrypted_update_; 120 std::unique_ptr<UpdateResponseData> encrypted_update_;
118 121
119 DISALLOW_COPY_AND_ASSIGN(WorkerEntityTracker); 122 DISALLOW_COPY_AND_ASSIGN(WorkerEntityTracker);
120 }; 123 };
121 124
122 } // namespace syncer_v2 125 } // namespace syncer_v2
123 126
124 #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