diff options
author | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-24 04:29:44 +0000 |
---|---|---|
committer | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-24 04:29:44 +0000 |
commit | bd6007ea79376728e7096a3261e812908933ba85 (patch) | |
tree | a794320cf3d5a922c7af84f965c5f6a30624cf4e /sync/internal_api/public/sessions | |
parent | 3e59af452cc296f22e14ee738594fec9cee38e7c (diff) | |
download | chromium_src-bd6007ea79376728e7096a3261e812908933ba85.zip chromium_src-bd6007ea79376728e7096a3261e812908933ba85.tar.gz chromium_src-bd6007ea79376728e7096a3261e812908933ba85.tar.bz2 |
Refactor ModelTypePayloadMap and ObjectIdPayloadMap to StateMaps.
This lays the groundwork for allowing us to pass ack handles for object IDs to
SyncNotifierObservers.
BUG=124149
TEST=none, there should be no behavior change.
Review URL: https://chromiumcodereview.appspot.com/10837214
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153158 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/public/sessions')
4 files changed, 14 insertions, 14 deletions
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.cc b/sync/internal_api/public/sessions/sync_session_snapshot.cc index 5e1e4e7..9e7a3b1 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 ModelTypePayloadMap& download_progress_markers, + const ModelTypeStateMap& 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", - ModelTypePayloadMapToValue(download_progress_markers_)); + ModelTypeStateMapToValue(download_progress_markers_)); 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,7 +123,7 @@ ModelTypeSet SyncSessionSnapshot::initial_sync_ended() const { return initial_sync_ended_; } -ModelTypePayloadMap SyncSessionSnapshot::download_progress_markers() const { +ModelTypeStateMap 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 d6fb025..74e972b 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_payload_map.h" +#include "sync/internal_api/public/base/model_type_state_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 ModelTypePayloadMap& download_progress_markers, + const ModelTypeStateMap& 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; - ModelTypePayloadMap download_progress_markers() const; + ModelTypeStateMap 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_; - ModelTypePayloadMap download_progress_markers_; + ModelTypeStateMap download_progress_markers_; bool has_more_to_sync_; bool is_silenced_; int num_encryption_conflicts_; diff --git a/sync/internal_api/public/sessions/sync_source_info.cc b/sync/internal_api/public/sessions/sync_source_info.cc index 9e15289..8a64c8a 100644 --- a/sync/internal_api/public/sessions/sync_source_info.cc +++ b/sync/internal_api/public/sessions/sync_source_info.cc @@ -13,12 +13,12 @@ namespace sessions { SyncSourceInfo::SyncSourceInfo() : updates_source(sync_pb::GetUpdatesCallerInfo::UNKNOWN) {} -SyncSourceInfo::SyncSourceInfo(const ModelTypePayloadMap& t) +SyncSourceInfo::SyncSourceInfo(const ModelTypeStateMap& t) : updates_source(sync_pb::GetUpdatesCallerInfo::UNKNOWN), types(t) {} SyncSourceInfo::SyncSourceInfo( const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& u, - const ModelTypePayloadMap& t) + const ModelTypeStateMap& t) : updates_source(u), types(t) {} SyncSourceInfo::~SyncSourceInfo() {} @@ -27,7 +27,7 @@ DictionaryValue* SyncSourceInfo::ToValue() const { DictionaryValue* value = new DictionaryValue(); value->SetString("updatesSource", GetUpdatesSourceString(updates_source)); - value->Set("types", ModelTypePayloadMapToValue(types)); + value->Set("types", ModelTypeStateMapToValue(types)); return value; } diff --git a/sync/internal_api/public/sessions/sync_source_info.h b/sync/internal_api/public/sessions/sync_source_info.h index 390bdb5..619fc57 100644 --- a/sync/internal_api/public/sessions/sync_source_info.h +++ b/sync/internal_api/public/sessions/sync_source_info.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" #include "sync/internal_api/public/base/model_type.h" -#include "sync/internal_api/public/base/model_type_payload_map.h" +#include "sync/internal_api/public/base/model_type_state_map.h" #include "sync/protocol/sync.pb.h" namespace base { @@ -22,17 +22,17 @@ namespace sessions { // specific payloads which should be sent to the server. struct SyncSourceInfo { SyncSourceInfo(); - explicit SyncSourceInfo(const ModelTypePayloadMap& t); + explicit SyncSourceInfo(const ModelTypeStateMap& t); SyncSourceInfo( const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& u, - const ModelTypePayloadMap& t); + const ModelTypeStateMap& t); ~SyncSourceInfo(); // Caller takes ownership of the returned dictionary. base::DictionaryValue* ToValue() const; sync_pb::GetUpdatesCallerInfo::GetUpdatesSource updates_source; - ModelTypePayloadMap types; + ModelTypeStateMap types; }; } // namespace sessions |