summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/public
diff options
context:
space:
mode:
Diffstat (limited to 'sync/internal_api/public')
-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/sync_session_snapshot.cc18
-rw-r--r--sync/internal_api/public/sessions/sync_session_snapshot.h6
-rw-r--r--sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc13
-rw-r--r--sync/internal_api/public/test/test_entry_factory.h5
6 files changed, 7 insertions, 38 deletions
diff --git a/sync/internal_api/public/engine/sync_status.cc b/sync/internal_api/public/engine/sync_status.cc
index f4037da..6291b29 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),
- initial_sync_ended(false),
updates_available(0),
updates_received(0),
reflected_updates_received(0),
diff --git a/sync/internal_api/public/engine/sync_status.h b/sync/internal_api/public/engine/sync_status.h
index 5afc356..31cbf4c 100644
--- a/sync/internal_api/public/engine/sync_status.h
+++ b/sync/internal_api/public/engine/sync_status.h
@@ -48,8 +48,6 @@ struct SYNC_EXPORT SyncStatus {
int committed_count;
bool syncing;
- // True after a client has done a first sync.
- bool initial_sync_ended;
// Total updates available. If zero, nothing left to download.
int64 updates_available;
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.cc b/sync/internal_api/public/sessions/sync_session_snapshot.cc
index d74ffa7..b0e9fac 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot.cc
+++ b/sync/internal_api/public/sessions/sync_session_snapshot.cc
@@ -12,8 +12,7 @@ namespace syncer {
namespace sessions {
SyncSessionSnapshot::SyncSessionSnapshot()
- : is_share_usable_(false),
- is_silenced_(false),
+ : is_silenced_(false),
num_encryption_conflicts_(0),
num_hierarchy_conflicts_(0),
num_server_conflicts_(0),
@@ -26,8 +25,6 @@ SyncSessionSnapshot::SyncSessionSnapshot()
SyncSessionSnapshot::SyncSessionSnapshot(
const ModelNeutralState& model_neutral_state,
- bool is_share_usable,
- ModelTypeSet initial_sync_ended,
const ProgressMarkerMap& download_progress_markers,
bool is_silenced,
int num_encryption_conflicts,
@@ -41,8 +38,6 @@ SyncSessionSnapshot::SyncSessionSnapshot(
const std::vector<int>& num_entries_by_type,
const std::vector<int>& num_to_delete_entries_by_type)
: model_neutral_state_(model_neutral_state),
- is_share_usable_(is_share_usable),
- initial_sync_ended_(initial_sync_ended),
download_progress_markers_(download_progress_markers),
is_silenced_(is_silenced),
num_encryption_conflicts_(num_encryption_conflicts),
@@ -79,9 +74,6 @@ DictionaryValue* SyncSessionSnapshot::ToValue() const {
value->SetInteger(
"numServerChangesRemaining",
static_cast<int>(model_neutral_state_.num_server_changes_remaining));
- value->SetBoolean("isShareUsable", is_share_usable_);
- value->Set("initialSyncEnded",
- ModelTypeSetToValue(initial_sync_ended_));
value->Set("downloadProgressMarkers",
ProgressMarkerMapToValue(download_progress_markers_).release());
value->SetBoolean("isSilenced", is_silenced_);
@@ -130,14 +122,6 @@ int64 SyncSessionSnapshot::num_server_changes_remaining() const {
return model_neutral_state().num_server_changes_remaining;
}
-bool SyncSessionSnapshot::is_share_usable() const {
- return is_share_usable_;
-}
-
-ModelTypeSet SyncSessionSnapshot::initial_sync_ended() const {
- return initial_sync_ended_;
-}
-
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 25195a7..be29d35 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot.h
+++ b/sync/internal_api/public/sessions/sync_session_snapshot.h
@@ -32,8 +32,6 @@ class SYNC_EXPORT SyncSessionSnapshot {
SyncSessionSnapshot();
SyncSessionSnapshot(
const ModelNeutralState& model_neutral_state,
- bool is_share_usable,
- ModelTypeSet initial_sync_ended,
const ProgressMarkerMap& download_progress_markers,
bool is_silenced,
int num_encryption_conflicts,
@@ -57,8 +55,6 @@ class SYNC_EXPORT SyncSessionSnapshot {
return model_neutral_state_;
}
int64 num_server_changes_remaining() const;
- bool is_share_usable() const;
- ModelTypeSet initial_sync_ended() const;
const ProgressMarkerMap& download_progress_markers() const;
bool is_silenced() const;
int num_encryption_conflicts() const;
@@ -77,8 +73,6 @@ class SYNC_EXPORT SyncSessionSnapshot {
private:
ModelNeutralState model_neutral_state_;
- bool is_share_usable_;
- ModelTypeSet initial_sync_ended_;
ProgressMarkerMap download_progress_markers_;
bool is_silenced_;
int num_encryption_conflicts_;
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 5a97a16..9301ffd 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc
+++ b/sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc
@@ -33,12 +33,6 @@ TEST_F(SyncSessionSnapshotTest, SyncSessionSnapshotToValue) {
model_neutral.num_local_overwrites = 15;
model_neutral.num_server_overwrites = 18;
- const bool kIsShareUsable = true;
-
- const ModelTypeSet initial_sync_ended(BOOKMARKS, PREFERENCES);
- scoped_ptr<ListValue> expected_initial_sync_ended_value(
- ModelTypeSetToValue(initial_sync_ended));
-
ProgressMarkerMap download_progress_markers;
download_progress_markers[BOOKMARKS] = "test";
download_progress_markers[APPS] = "apps";
@@ -59,8 +53,6 @@ TEST_F(SyncSessionSnapshotTest, SyncSessionSnapshotToValue) {
expected_sources_list_value->Append(source.ToValue());
SyncSessionSnapshot snapshot(model_neutral,
- kIsShareUsable,
- initial_sync_ended,
download_progress_markers,
kIsSilenced,
kNumEncryptionConflicts,
@@ -74,7 +66,7 @@ TEST_F(SyncSessionSnapshotTest, SyncSessionSnapshotToValue) {
std::vector<int>(MODEL_TYPE_COUNT,0),
std::vector<int>(MODEL_TYPE_COUNT, 0));
scoped_ptr<DictionaryValue> value(snapshot.ToValue());
- EXPECT_EQ(20u, value->size());
+ EXPECT_EQ(18u, value->size());
ExpectDictIntegerValue(model_neutral.num_successful_commits,
*value, "numSuccessfulCommits");
ExpectDictIntegerValue(model_neutral.num_successful_bookmark_commits,
@@ -91,9 +83,6 @@ TEST_F(SyncSessionSnapshotTest, SyncSessionSnapshotToValue) {
*value, "numServerOverwrites");
ExpectDictIntegerValue(model_neutral.num_server_changes_remaining,
*value, "numServerChangesRemaining");
- ExpectDictBooleanValue(kIsShareUsable, *value, "isShareUsable");
- ExpectDictListValue(*expected_initial_sync_ended_value, *value,
- "initialSyncEnded");
ExpectDictDictionaryValue(*expected_download_progress_markers_value,
*value, "downloadProgressMarkers");
ExpectDictBooleanValue(kIsSilenced, *value, "isSilenced");
diff --git a/sync/internal_api/public/test/test_entry_factory.h b/sync/internal_api/public/test/test_entry_factory.h
index d5bc911..071a501 100644
--- a/sync/internal_api/public/test/test_entry_factory.h
+++ b/sync/internal_api/public/test/test_entry_factory.h
@@ -56,6 +56,11 @@ class TestEntryFactory {
int64 CreateSyncedItem(const std::string& name,
ModelType model_type, bool is_folder);
+ // Creates a root node that IS_UNAPPLIED. Smiilar to what one would find in
+ // the database between the ProcessUpdates of an initial datatype configure
+ // cycle and the ApplyUpdates step of the same sync cycle.
+ int64 CreateUnappliedRootNode(ModelType model_type);
+
// Looks up the item referenced by |meta_handle|. If successful, overwrites
// the server specifics with |specifics|, sets
// IS_UNAPPLIED_UPDATES/IS_UNSYNCED appropriately, and returns true.