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

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

Issue 2420213002: [USS] Show USS counters in Types tab (Closed)
Patch Set: git rebase Created 4 years, 2 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // model's previous commit attempt(s). 48 // model's previous commit attempt(s).
49 void RequestCommit(const CommitRequestData& data); 49 void RequestCommit(const CommitRequestData& data);
50 50
51 // Tracks the receipt of a commit response and fills in some local-only data 51 // Tracks the receipt of a commit response and fills in some local-only data
52 // on it to be passed back to the processor. 52 // on it to be passed back to the processor.
53 void ReceiveCommitResponse(CommitResponseData* ack); 53 void ReceiveCommitResponse(CommitResponseData* ack);
54 54
55 // Handles receipt of an update from the server. 55 // Handles receipt of an update from the server.
56 void ReceiveUpdate(const UpdateResponseData& update); 56 void ReceiveUpdate(const UpdateResponseData& update);
57 57
58 // Check if update contains newer version than local.
59 bool UpdateContainsNewVersion(const UpdateResponseData& update);
60
58 // Handles the receipt of an encrypted update from the server. 61 // Handles the receipt of an encrypted update from the server.
59 // 62 //
60 // 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
61 // 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
62 // is out of date. 65 // is out of date.
63 bool ReceiveEncryptedUpdate(const UpdateResponseData& data); 66 bool ReceiveEncryptedUpdate(const UpdateResponseData& data);
64 67
65 // Functions to fetch the latest encrypted update. 68 // Functions to fetch the latest encrypted update.
66 bool HasEncryptedUpdate() const; 69 bool HasEncryptedUpdate() const;
67 UpdateResponseData GetEncryptedUpdate() const; 70 UpdateResponseData GetEncryptedUpdate() const;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 125 } // namespace syncer
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