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

Unified Diff: sync/sessions/data_type_tracker.cc

Issue 19309002: sync: Add pre-commit update avoidance mode + flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits Created 7 years, 5 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 | « sync/sessions/data_type_tracker.h ('k') | sync/sessions/nudge_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/data_type_tracker.cc
diff --git a/sync/sessions/data_type_tracker.cc b/sync/sessions/data_type_tracker.cc
index 3eabbbe758f959f1811167649bdabd01c44f900a..a061679839f174b182925b7e1f22f2a24e44fe25 100644
--- a/sync/sessions/data_type_tracker.cc
+++ b/sync/sessions/data_type_tracker.cc
@@ -59,7 +59,17 @@ bool DataTypeTracker::IsSyncRequired() const {
return !IsThrottled() &&
(local_nudge_count_ > 0 ||
local_refresh_request_count_ > 0 ||
- !pending_payloads_.empty());
+ HasPendingInvalidation() ||
+ local_payload_overflow_ ||
+ server_payload_overflow_);
+}
+
+bool DataTypeTracker::IsGetUpdatesRequired() const {
+ return !IsThrottled() &&
+ (local_refresh_request_count_ > 0 ||
+ HasPendingInvalidation() ||
+ local_payload_overflow_ ||
+ server_payload_overflow_);
}
bool DataTypeTracker::HasLocalChangePending() const {
« no previous file with comments | « sync/sessions/data_type_tracker.h ('k') | sync/sessions/nudge_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698