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

Unified Diff: components/sync/engine_impl/worker_entity_tracker.cc

Issue 2420213002: [USS] Show USS counters in Types tab (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/engine_impl/worker_entity_tracker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/engine_impl/worker_entity_tracker.cc
diff --git a/components/sync/engine_impl/worker_entity_tracker.cc b/components/sync/engine_impl/worker_entity_tracker.cc
index f8cf9e39613141127d182f929b69867b146b3e2a..a6ba849d5381456907e2cd877ba2ef4d56a3fe64 100644
--- a/components/sync/engine_impl/worker_entity_tracker.cc
+++ b/components/sync/engine_impl/worker_entity_tracker.cc
@@ -128,7 +128,7 @@ void WorkerEntityTracker::ReceiveCommitResponse(CommitResponseData* ack) {
}
void WorkerEntityTracker::ReceiveUpdate(const UpdateResponseData& update) {
- if (update.response_version <= highest_gu_response_version_)
+ if (!UpdateContainsNewVersion(update))
return;
highest_gu_response_version_ = update.response_version;
@@ -145,6 +145,11 @@ void WorkerEntityTracker::ReceiveUpdate(const UpdateResponseData& update) {
}
}
+bool WorkerEntityTracker::UpdateContainsNewVersion(
+ const UpdateResponseData& update) {
+ return (update.response_version > highest_gu_response_version_);
+}
+
bool WorkerEntityTracker::ReceiveEncryptedUpdate(
const UpdateResponseData& data) {
if (data.response_version < highest_gu_response_version_)
« no previous file with comments | « components/sync/engine_impl/worker_entity_tracker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698