diff options
author | mmontgomery@chromium.org <mmontgomery@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-15 19:18:15 +0000 |
---|---|---|
committer | mmontgomery@chromium.org <mmontgomery@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-15 19:18:15 +0000 |
commit | b2565823ffd83289eb2d092bb3f4db877a50408e (patch) | |
tree | 7d72f181e951e69a394d83d911f8a3c583335b89 /sync/internal_api/public/sessions | |
parent | 8969385b1fc69d8077083bb92ba4b595210f5696 (diff) | |
download | chromium_src-b2565823ffd83289eb2d092bb3f4db877a50408e.zip chromium_src-b2565823ffd83289eb2d092bb3f4db877a50408e.tar.gz chromium_src-b2565823ffd83289eb2d092bb3f4db877a50408e.tar.bz2 |
[sync] Refactor SyncSessionSnapshot to use new ProgressMarkerMap.
This is the first step in refactoring the Sync integration tests to use
progress markers to detect quiescence. This will save that mechanism from
having to round-trip progress markers through multiple encodings. We can
instead use protobufs' existing serialization/deserialization methods.
BUG=
Review URL: https://chromiumcodereview.appspot.com/10986004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161918 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/public/sessions')
-rw-r--r-- | sync/internal_api/public/sessions/sync_session_snapshot.cc | 8 | ||||
-rw-r--r-- | sync/internal_api/public/sessions/sync_session_snapshot.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.cc b/sync/internal_api/public/sessions/sync_session_snapshot.cc index 15e8893..0f6fb01 100644 --- a/sync/internal_api/public/sessions/sync_session_snapshot.cc +++ b/sync/internal_api/public/sessions/sync_session_snapshot.cc @@ -29,7 +29,7 @@ SyncSessionSnapshot::SyncSessionSnapshot( const ModelNeutralState& model_neutral_state, bool is_share_usable, ModelTypeSet initial_sync_ended, - const ModelTypeInvalidationMap& download_progress_markers, + const ProgressMarkerMap& download_progress_markers, bool more_to_sync, bool is_silenced, int num_encryption_conflicts, @@ -84,7 +84,7 @@ DictionaryValue* SyncSessionSnapshot::ToValue() const { value->Set("initialSyncEnded", ModelTypeSetToValue(initial_sync_ended_)); value->Set("downloadProgressMarkers", - ModelTypeInvalidationMapToValue(download_progress_markers_)); + ProgressMarkerMapToValue(download_progress_markers_).release()); value->SetBoolean("hasMoreToSync", has_more_to_sync_); value->SetBoolean("isSilenced", is_silenced_); // We don't care too much if we lose precision here, also. @@ -123,8 +123,8 @@ ModelTypeSet SyncSessionSnapshot::initial_sync_ended() const { return initial_sync_ended_; } -ModelTypeInvalidationMap -SyncSessionSnapshot::download_progress_markers() const { +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 1cc250f..16b0753 100644 --- a/sync/internal_api/public/sessions/sync_session_snapshot.h +++ b/sync/internal_api/public/sessions/sync_session_snapshot.h @@ -10,7 +10,7 @@ #include "base/basictypes.h" #include "base/time.h" #include "sync/internal_api/public/base/model_type.h" -#include "sync/internal_api/public/base/model_type_invalidation_map.h" +#include "sync/internal_api/public/base/progress_marker_map.h" #include "sync/internal_api/public/sessions/model_neutral_state.h" #include "sync/internal_api/public/sessions/sync_source_info.h" @@ -33,7 +33,7 @@ class SyncSessionSnapshot { const ModelNeutralState& model_neutral_state, bool is_share_usable, ModelTypeSet initial_sync_ended, - const ModelTypeInvalidationMap& download_progress_markers, + const ProgressMarkerMap& download_progress_markers, bool more_to_sync, bool is_silenced, int num_encryption_conflicts, @@ -58,7 +58,7 @@ class SyncSessionSnapshot { int64 num_server_changes_remaining() const; bool is_share_usable() const; ModelTypeSet initial_sync_ended() const; - ModelTypeInvalidationMap download_progress_markers() const; + const ProgressMarkerMap& download_progress_markers() const; bool has_more_to_sync() const; bool is_silenced() const; int num_encryption_conflicts() const; @@ -78,7 +78,7 @@ class SyncSessionSnapshot { ModelNeutralState model_neutral_state_; bool is_share_usable_; ModelTypeSet initial_sync_ended_; - ModelTypeInvalidationMap download_progress_markers_; + ProgressMarkerMap download_progress_markers_; bool has_more_to_sync_; bool is_silenced_; int num_encryption_conflicts_; |