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

Unified Diff: sync/sessions/status_controller.h

Issue 1132013004: [Sync] Refactoring polling to be reliable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Full patch Created 5 years, 7 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/internal_api/test/fake_sync_manager.cc ('k') | sync/sessions/status_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/status_controller.h
diff --git a/sync/sessions/status_controller.h b/sync/sessions/status_controller.h
index 9844929bcc1f48db51294468702fb082501d9ef3..eea5872338b3d7bf876c13f9ec039a562ff85261 100644
--- a/sync/sessions/status_controller.h
+++ b/sync/sessions/status_controller.h
@@ -56,11 +56,17 @@ class SYNC_EXPORT_PRIVATE StatusController {
int num_server_overwrites() const;
+ // The time at which we started the first sync cycle in this session.
base::Time sync_start_time() const {
- // The time at which we sent the first GetUpdates command for this sync.
return sync_start_time_;
}
+ // If a poll was performed in this session, the time at which it finished.
+ // Not set if no poll was performed.
+ base::Time poll_finish_time() const {
+ return poll_finish_time_;
+ }
+
const ModelNeutralState& model_neutral_state() const {
return model_neutral_;
}
@@ -91,12 +97,18 @@ class SYNC_EXPORT_PRIVATE StatusController {
void set_commit_result(const SyncerError result);
void UpdateStartTime();
+ void UpdatePollTime();
private:
ModelNeutralState model_neutral_;
+ // Time the last sync cycle began.
base::Time sync_start_time_;
+ // If a poll was performed, the time it finished. Not set if not poll was
+ // performed.
+ base::Time poll_finish_time_;
+
DISALLOW_COPY_AND_ASSIGN(StatusController);
};
« no previous file with comments | « sync/internal_api/test/fake_sync_manager.cc ('k') | sync/sessions/status_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698