summaryrefslogtreecommitdiffstats
path: root/sync/internal_api
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-28 17:25:43 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-28 17:25:43 +0000
commitecfe00c95c3cfc8e0b85682e0320afe1cb83cd74 (patch)
tree7c4178b2b0e37fbb15d34af20a5954f93eb6a070 /sync/internal_api
parentf26417d92b7e22c3b911bf219a04eae372c09c2f (diff)
downloadchromium_src-ecfe00c95c3cfc8e0b85682e0320afe1cb83cd74.zip
chromium_src-ecfe00c95c3cfc8e0b85682e0320afe1cb83cd74.tar.gz
chromium_src-ecfe00c95c3cfc8e0b85682e0320afe1cb83cd74.tar.bz2
Remove changes remaining counter from about:sync
The label "changes remaining" is not quite correct. It's actually set to either zero or one, depending on whether or not the current sync cycle should result in more downloads. If there is an issue with infinite download looping, we should be able to detect and debug it based on the protocol logs, among other things. The protocol logs indicate when a GetUpdates response had a non-zero "changes remaining" value. BUG=349301 Review URL: https://codereview.chromium.org/256413007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266594 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api')
-rw-r--r--sync/internal_api/public/engine/sync_status.cc1
-rw-r--r--sync/internal_api/public/engine/sync_status.h2
-rw-r--r--sync/internal_api/public/sessions/model_neutral_state.cc3
-rw-r--r--sync/internal_api/public/sessions/model_neutral_state.h5
-rw-r--r--sync/internal_api/public/sessions/sync_session_snapshot.cc7
-rw-r--r--sync/internal_api/public/sessions/sync_session_snapshot.h1
-rw-r--r--sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc5
7 files changed, 2 insertions, 22 deletions
diff --git a/sync/internal_api/public/engine/sync_status.cc b/sync/internal_api/public/engine/sync_status.cc
index b1687e3..6ac894e 100644
--- a/sync/internal_api/public/engine/sync_status.cc
+++ b/sync/internal_api/public/engine/sync_status.cc
@@ -14,7 +14,6 @@ SyncStatus::SyncStatus()
server_conflicts(0),
committed_count(0),
syncing(false),
- updates_available(0),
updates_received(0),
reflected_updates_received(0),
tombstone_updates_received(0),
diff --git a/sync/internal_api/public/engine/sync_status.h b/sync/internal_api/public/engine/sync_status.h
index c32be00..1c284ce 100644
--- a/sync/internal_api/public/engine/sync_status.h
+++ b/sync/internal_api/public/engine/sync_status.h
@@ -49,8 +49,6 @@ struct SYNC_EXPORT SyncStatus {
bool syncing;
- // Total updates available. If zero, nothing left to download.
- int64 updates_available;
// Total updates received by the syncer since browser start.
int updates_received;
// Total updates received that are echoes of our own changes.
diff --git a/sync/internal_api/public/sessions/model_neutral_state.cc b/sync/internal_api/public/sessions/model_neutral_state.cc
index fa2b019..37d0174 100644
--- a/sync/internal_api/public/sessions/model_neutral_state.cc
+++ b/sync/internal_api/public/sessions/model_neutral_state.cc
@@ -22,8 +22,7 @@ ModelNeutralState::ModelNeutralState()
last_get_key_result(UNSET),
last_download_updates_result(UNSET),
commit_result(UNSET),
- items_committed(false),
- num_server_changes_remaining(0) {
+ items_committed(false) {
}
ModelNeutralState::~ModelNeutralState() {}
diff --git a/sync/internal_api/public/sessions/model_neutral_state.h b/sync/internal_api/public/sessions/model_neutral_state.h
index d85d039..8d97f89 100644
--- a/sync/internal_api/public/sessions/model_neutral_state.h
+++ b/sync/internal_api/public/sessions/model_neutral_state.h
@@ -53,11 +53,6 @@ struct SYNC_EXPORT ModelNeutralState {
// Set to true by PostCommitMessageCommand if any commits were successful.
bool items_committed;
-
- // Number of changes remaining, according to the server.
- // Take it as an estimate unless it's value is zero, in which case there
- // really is nothing more to download.
- int64 num_server_changes_remaining;
};
bool HasSyncerError(const ModelNeutralState& state);
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.cc b/sync/internal_api/public/sessions/sync_session_snapshot.cc
index 97bc094..4e7a2b1 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot.cc
+++ b/sync/internal_api/public/sessions/sync_session_snapshot.cc
@@ -70,9 +70,6 @@ base::DictionaryValue* SyncSessionSnapshot::ToValue() const {
model_neutral_state_.num_local_overwrites);
value->SetInteger("numServerOverwrites",
model_neutral_state_.num_server_overwrites);
- value->SetInteger(
- "numServerChangesRemaining",
- static_cast<int>(model_neutral_state_.num_server_changes_remaining));
value->Set("downloadProgressMarkers",
ProgressMarkerMapToValue(download_progress_markers_).release());
value->SetBoolean("isSilenced", is_silenced_);
@@ -112,10 +109,6 @@ std::string SyncSessionSnapshot::ToString() const {
return json;
}
-int64 SyncSessionSnapshot::num_server_changes_remaining() const {
- return model_neutral_state().num_server_changes_remaining;
-}
-
const ProgressMarkerMap&
SyncSessionSnapshot::download_progress_markers() const {
return download_progress_markers_;
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.h b/sync/internal_api/public/sessions/sync_session_snapshot.h
index 97a97aa..a764de1 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot.h
+++ b/sync/internal_api/public/sessions/sync_session_snapshot.h
@@ -52,7 +52,6 @@ class SYNC_EXPORT SyncSessionSnapshot {
ModelNeutralState model_neutral_state() const {
return model_neutral_state_;
}
- int64 num_server_changes_remaining() const;
const ProgressMarkerMap& download_progress_markers() const;
bool is_silenced() const;
int num_encryption_conflicts() const;
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc b/sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc
index 881ab01..d19a69c 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc
+++ b/sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc
@@ -23,7 +23,6 @@ class SyncSessionSnapshotTest : public testing::Test {};
TEST_F(SyncSessionSnapshotTest, SyncSessionSnapshotToValue) {
ModelNeutralState model_neutral;
- model_neutral.num_server_changes_remaining = 105;
model_neutral.num_successful_commits = 5;
model_neutral.num_successful_bookmark_commits = 10;
model_neutral.num_updates_downloaded_total = 100;
@@ -56,7 +55,7 @@ TEST_F(SyncSessionSnapshotTest, SyncSessionSnapshotToValue) {
std::vector<int>(MODEL_TYPE_COUNT, 0),
sync_pb::GetUpdatesCallerInfo::UNKNOWN);
scoped_ptr<base::DictionaryValue> value(snapshot.ToValue());
- EXPECT_EQ(17u, value->size());
+ EXPECT_EQ(16u, value->size());
ExpectDictIntegerValue(model_neutral.num_successful_commits,
*value, "numSuccessfulCommits");
ExpectDictIntegerValue(model_neutral.num_successful_bookmark_commits,
@@ -71,8 +70,6 @@ TEST_F(SyncSessionSnapshotTest, SyncSessionSnapshotToValue) {
*value, "numLocalOverwrites");
ExpectDictIntegerValue(model_neutral.num_server_overwrites,
*value, "numServerOverwrites");
- ExpectDictIntegerValue(model_neutral.num_server_changes_remaining,
- *value, "numServerChangesRemaining");
ExpectDictDictionaryValue(*expected_download_progress_markers_value,
*value, "downloadProgressMarkers");
ExpectDictBooleanValue(kIsSilenced, *value, "isSilenced");